Jakamo file callback api (v2)
Download OpenAPI specification:Download
This document describes an api that can be used to share documents with Jakamo supplier experience platform.
This api can be implemented in any technology as long as it follows the guidelines below. The api is implemented by the party that holds the documents and Jakamo will generate requests when documents are needed.
All requests to the API must be authenticated. The authentication is done using an api key. The api key is provided in a header that can have any name, X-API-KEY is the default.
HTTP verbs
POST - Create a new resource
GET - Read one or more resources
PUT - Replace a resource
DELETE - Delete a resource
HTTP codes
200 - OK. The request was successful.
201 - Created. The request was successful and a new resource was created.
400 - Bad request. The request was invalid. See the response body for details.
401 - Unauthorized. The request was not authenticated. See the response body for details.
404 - Not found. The requested resource was not found.
500 - Internal server error. An error occurred in the server. See the response body for details.
Handling errors
If the API returns an error, the response body will contain an error object. The error object contains a message and a list of errors.
If a 4xx status code is returned, clients must take care not to retry the request without modification.
If a 5xx status code is returned, clients may retry the request. It is preferable to use an exponential backoff strategy when retrying requests.
Create supplier document
Create a new document that is linked to the given supplier
path Parameters
supplier-id required | string Example: 54454543 Id of the supplier that the file is related to |
Request Body schema: application/jsonrequired
Development action to update
fileName | string Name of the file to be created |
base64EncodedContents | string Base64 encoded file contents |
Array of objects Optional list of key value pairs of metadata associated with the document |
Responses
Request samples
- Payload
{- "fileName": "file.txt",
- "base64EncodedContents": "CSCSACFFESADASAD...",
- "metaData": [
- {
- "key": "validTo",
- "value": "2024-05-05"
}
]
}
Replace supplier document
Replace an existing file related to a supplier
path Parameters
supplier-id required | string Example: 54454543 Id of the supplier that the file is related to |
Request Body schema: application/jsonrequired
Development action to update
fileName | string Name of the file to be created |
base64EncodedContents | string Base64 encoded file contents |
Array of objects Optional list of key value pairs of metadata associated with the document |
Responses
Request samples
- Payload
{- "fileName": "file.txt",
- "base64EncodedContents": "CSCSACFFESADASAD...",
- "metaData": [
- {
- "key": "validTo",
- "value": "2024-05-05"
}
]
}
Query material documents
Query documents related to a material / product
query Parameters
materialId required | string Identifier of the material to fetch |
revision | string Optional revision number. If not specified, the latest revision is returned |
Responses
Response samples
- 200
{- "data": [
- {
- "fileName": "file.txt",
- "description": "This is a file. It contains data. Data is good.",
- "type": "Drawing",
}
]
}