Path: api/v1/docs
This API is JSON:API compliant.
This endpoint supports the following methods:
GET
This endpoint requires an OAuth bearer token, and returns errors in a standard shape. See API Conventions for authentication, error responses and paging, which apply to every endpoint.
The resource type for this endpoint is Document
The identifier is docid
Attributes
The Document resource type attributes are as follows:
| Attribute | Type | Description |
|---|---|---|
| code | string | The document code. |
| docName | string | The document name. |
Path: api/v1/docs?filter[objreftype]=Stock&filter[objrefid]=DEPL For more information see Resource Filtering. Response: This example shows the maximum set of fields the endpoint can return, all populated. A real response only contains the data that applies to that record, so fields that are empty or not relevant are omitted — do not assume every field shown here will be present in every response. This is a list. To keep the example readable, only the first item below is written out; the later items have been trimmed down in this documentation. In a real response each item comes back with the data applicable to that record (as described above). Side-loading related resources with the include query parameter is not supported on list endpoints: an include parameter is ignored here and no included section is returned. To retrieve a related resource, request it directly using the id shown in each item's relationships, or use the single-resource (get by id) endpoint, which does support include.
Example GET (Return using filter)
Filtering
Field Type Comment
objrefid Text The object reference. For a job, the job number, for stock the stock code.
objreftype Text The type of object being referenced, can be Job,Stock
{
"data": [
{
"id": "232",
"type": "Document",
"attributes": {
"code": "232",
"docName": "default-image_100.png"
}
},
{
"id": "233",
"type": "Document",
"attributes": {
"code": "233",
"docName": "default-image.gif"
}
},
{
"id": "234",
"type": "Document",
"attributes": {
"code": "234",
"docName": "Report.pdf"
}
}
]
}