All Versions

Version 1
Version 2


Page tree

Supplier API v2

Skip to end of metadata
Go to start of metadata

Requests that specify an identifier for the requested resource in the format of /resource/id will return at most one item using this data format.

You will never receive an empty response. Instead, if the requested identifier is not found, you will receive a 404: Not Found response. 

Read more about Error Handling.

Data Model

The complete data model will be dependent on the requested resource. 

Click here for a full list of available Resources.

NameTypeDescription
_links_links

List of links to related resources. Individual resource models may specify additional links beyond those described here.

_metadata_metadataAdditional metadata describing the item, such as when it was created or last modified.
{ ... }mixedThe remaining elements defined by the individual resource data models

Examples

{
	"_links": {
		"self": {
		"href": "https://www.example.com/api/v2/pets/1",
		"class": "pets",
	    "identifier": "1"
	},
	"_metadata": {
		"created": "2018-09-30T23:11:17Z",
		"lastModified": "2018-10-01T02:19:22Z"
	},
	"petId": 1,
	"type": "dog",
	"name": "Fido"
}

_links

List of links that can be used to interact with the item. Only links that are valid for the current state of the item will be included in the response.

Individual resource models may specify additional links beyond those described below. Common links that are used by all resources are as follows. 

NameTypeDescription
selfLinkSelf-referencing link to the item in the response

Examples

"self": {
	"href": "https://www.example.com/api/v2/pets/1",
	"class": "pets",
    "identifier": "1"
}

_metadata

Metadata is information about the state of a resource that is not interesting in the representation of the data, but may affect how you interact with or cache the data. 

Examples of metadata are things like the date a resource was created or last modified.

Individual resource models may specify additional metadata beyond that described below. Some common examples are listed here. 

NameTypeDescription
createddatetimeDate and time that the resource was created in our system.
lastModifieddatetimeDate and time that the resource was last modified.

Examples

"_metadata": {
	"created": "2018-09-30T23:11:17Z",
	"lastModified": "2018-10-01T02:19:22Z"
}

 

  • No labels
Write a comment…