API - Links

The Links resource contains a single listLinks method that returns a list of methods, media types and URL's.

Note: The Links resource is the API Endpoint.

Method Name: listLinks

Retrieve list of available of resources.

  • Method: GET

  • Parameters: None

  • Request Headers: Accept, Authorization, Host

  • Request Message Body: None

  • Response Headers: Content-Length, Content-Type, Content-Location

  • Response Message Body: Links to available related resources

  • Response Status: 200, 400, 401, 403, 404

  • Media Types:

    • application/vnd.koleimports.ds.link+xml
    • application/vnd.koleimports.ds.link+json

Request Parameters:

GET /
Host: example.com 
Authorization: Basic {id}:{api_key}
Accept: application/vnd.koleimports.ds.link+xml

Example CURL Request:

curl -H "Accept: application/vnd.koleimports.ds.link+xml" "https://{id}:{api_key}@api.koleimports.com"

Example Response:

<?xml version="1.0" encoding="utf-8"?>
<links>
    <link>
        <method>getAccount</method>
        <media_type>application/vnd.koleimports.ds.account+xml</media_type>
        <url>https://api.koleimports.com/accounts/1</url>
    </link>
    <link>
        <method>listOrders</method>
        <media_type>application/vnd.koleimports.ds.order+xml</media_type>
        <url>https://api.koleimports.com/orders/</url>
    </link>
    <link>
        <method>listProducts</method>
        <media_type>application/vnd.koleimports.ds.product+xml</media_type>
        <url>https://api.koleimports.com/products/</url>
    </link>
    <link>
        <method>listShipments</method>
        <media_type>application/vnd.koleimports.ds.shipment+xml</media_type>
        <url>https://api.koleimports.com/shipments/</url>
    </link>
    <link>
        <method>listTransactions</method>
        <media_type>application/vnd.koleimports.ds.transaction+xml</media_type>
        <url>https://api.koleimports.com/transactions/</url>
    </link>
</links>

Response Body Field Definitions

Field Name Description Type Length
Field Name Description Type Length
links

Children:

  • link
n/a n/a
link

Children:

  • method
  • media_type
  • url
n/a n/a
method

The name of the API method.

String 100
media_type

The media type for the method. Use this in the Accept Header.

String 250
url

The URL used to access the resource.

String 250

Recent Discussions

19 Aug, 2017 08:19 PM
18 Aug, 2017 03:35 PM
18 Aug, 2017 03:22 AM
16 Aug, 2017 11:58 AM
16 Aug, 2017 01:31 AM