Introduction
Welcome to our API documentation. The Cenports API provides a set of actions allowing suppliers, vendors, and all sort of other users and application to seamlessly integrate with Cenports. We hope that this documentation helps you get up and running with your Cenports Integration.
If you are interested in integrating with Cenports's APIs, please reach out to our integration team at integrations@cenports.com and an integration manager will contact you with next steps. Note that immediate support for an integration might not be available, due to resource constraints.
Cenports's API utilizes the OAuth2 client-credentials grant in a non-interactive profile for authentication and authorization. The majority of API functionality has been made available via RESTful APIs.
Endpoint
- Production:
https://api.cenports.io/v2 - Staging:
https://stg.api.cenports.io/v2
Authentication
Authentication is performed using an OAuth2 client-credentials workflow. You POST your client id and secret to the token retrieval endpoint to get a new access token. This authenticated token must be included in all future API calls. Tokens are valid for 12 hours, so check the exp field in the response for the expiration date/time in seconds to see when you will need to re-authenticate by grabbing a new token.
In order to use the Cenports API, you will need to contact our integration team first. After approval, we will allocate a client id and secret to you. You will pass the client id and secret value to the token endpoint.
POST /authorize
Request
{
"grant_type": "client_credentials",
"client_id": "{{CLIENT_ID}}",
"client_secret": "{{CLIENT_SECRET}}"
}
Headers
| Name | Type |
|---|---|
| Content-Type | application/json |
| Accept | application/json |
Body
| Name | Default Value | Required |
|---|---|---|
| grant_type | client_credentials | Yes |
| client_id | Yes | |
| client_secret | Yes |
Response
{
"scopes": [
"basic",
"view-account"
],
"token_type": "Bearer",
"expires_in": 86400,
"access_token": "eyJ0eAiOiJKV1Q....VgQ4F1N1i9rafU"
}
The token response will include your access token (access_token), an expiration length in seconds (expires_in), the scopes currently assigned to the token (scopes), and the type of the token (token_type). When making requests to the API, you will need to set your HTTP Authorization header to {token_type} {access_token} from your token response. This will look something like Authorization: Bearer eyJ0eXAiO...SEI0T1mG0Cqxjg.
Orders
The Order Management APIs allow partners to retrieve and create orders from Cenports.
Get Orders
This is the endpoint for retrieving order information. The arguments can be tailored to your needs. For instance, the input in the examples section will pull only two orders with the defined order numbers from the ABC123 sales channel under partner account 111AAA, but you could omit the order list to pull all orders between a specified start and end date.
By default, our API will only return 50 items in a single request. You can free to adjust the limit to suit your needs. The current maximum limit for getting orders is 300.
GET /orders
{
"partnerId": "111AAA",
"channelId": "ABC123",
"orders": "A12345,B12345",
"limit": 10,
"startDate": "2019-11-02",
"endDate": "2019-11-05",
"isAcknowledged": false,
"isPaginated": true
}
Request
Headers
| Name | Type |
|---|---|
| Authorization! | Bearer |
| Content-Type | application/json |
| Accept | application/json |
Body
Any parameter type with a "!" is a required parameter
| Name | Type | Description |
|---|---|---|
| partnerId | string(255)! | A unique ID assigned to our partner. |
| channelId | string(255) | (Optional) A unique ID assigned to the sales channel under the partner account. Our API will only return the order information related to the particular sales channel if the channel ID field is present. |
| orders | string(255) | (Conditional) A list of order numbers separated by commas |
| isAcknowledged | bool | (Optional) Specify orders that are marked as acknowledged |
| isPaginated | bool | (Optional) Specify whether response should be paginated |
| limit | int | (Optional) Specify number of items in response |
| startDate | date | (Conditional) Required if endDate field present |
| endDate | date | (Conditional) Required if startDate field present |
Response
{
"orderNo": "A12345",
"customerOrderNo": null,
"orderDate": "1970-08-22T16:35:11.000000Z",
"channel": "My Channel",
"channelId": "WDSDL-1",
"customerName": "Gerald A Nickerson",
"contactName": null,
"contactEmail": null,
"contactPhone": "405-587-6227",
"status": "Incompleted",
"billTo": {
"name": "Gerald A Nickerson",
"address1": "2288 Hott Street",
"address2": null,
"city": "Oklahoma City",
"state": "OK",
"country": "US",
"postalCode": "73102"
},
"shipFrom": {
"warehouseCode": "WDSDL-WH-CA",
"warehouseName": "WDSDL California Warehouse",
"location": "989 Hanifan Lane, Tracy, CA, US, 91234",
"contactPhone": "770-374-2887",
"availability": true,
"owner": "WDSDL"
},
"shipTo": {
"address1": "2288 Hott Street",
"address2": null,
"city": "Oklahoma City",
"state": "OK",
"country": "US",
"postalCode": "73102"
},
"shippingInfo": {
"carrierCode": "UPSN",
"serviceLevel": "GR"
},
"lineItems": [
{
"orderNo": "A12345",
"lineItem": "1",
"productSku": "SKU-1",
"retailerSku": null,
"productName": "Product name 1",
"shipFromWarehouseCode": "WDSDL-WH-CA",
"quantity": 1,
"price": 114.1,
"status": "shipped"
},
{
"orderNo": "A12345",
"lineItem": "2",
"productSku": "SKU-2",
"retailerSku": null,
"productName": "Product name 2",
"shipFromWarehouseCode": "WDSDL-WH-CA-2",
"quantity": 1,
"price": 231.2,
"status": "pending"
}
],
"pricing": {
"subTotal": 345.3,
"discount": 0,
"shipCost": 0,
"grandTotal": 345.3
},
"notes": {
"merchantMsg": null,
"retailerMsg": "Thank you for the purchase!"
}
}
Create Orders
This endpoint allows for orders to be created in Cenports.
POST /orders
{
"partnerId": "111AAA",
"channelId": "ABC123",
"orders": [
{
"orderNo": "A12346",
"orderDate": "2019-11-25",
"customerName": "Jon Doe",
"contactName": "Cenports",
"contactEmail": "jon@email.com",
"contactPhone": "1112223333",
"shipTo": {
"address1": "1742 Sabre Street",
"address2": "Building 2",
"city": "Hayward",
"state": "CA",
"country": "US",
"postalCode": "94545"
},
"shippingInfo": {
"carrierCode": "UPS",
"serviceLevel": "Ground",
"estimatedShipDate": "2019-12-01"
},
"lineItems": [
{
"sku": "product-1",
"quantity": 1,
"lineNumber": 1,
"consumerPrice": 20.00,
"subTotal": 20.00,
},
{
"sku": "product-2",
"quantity": 2,
"lineNumber": 2,
"consumerPrice": 15.00,
"subTotal": 30.00,
}
],
"subTotal": 50.00,
"shippingCost": 5.00,
"grandTotal": 55.00
},
{
"orderNo": "B12346",
"customerOrderNo": "CUST_ORDER_1",
"orderDate": "2019-11-25",
"customerName": "John Smith",
"contactName": "Mary Smith",
"contactEmail": "john@email.com",
"contactPhone": "1234567890",
"shipTo": {
"address1": "3159 Zimmerman Lane",
"address2": "",
"city": "Los Angeles",
"state": "CA",
"country": "US",
"postalCode": "90017"
},
"shippingInfo": {
"carrierCode": "FedEx",
"serviceLevel": "Ground",
"estimatedShipDate": "2019-12-03"
},
"lineItems": [
{
"sku": "product-3",
"quantity": 1,
"consumerPrice": 40.00,
"subTotal": 40.00,
}
],
"subTotal": 40.00,
"grandTotal": 40.00
}
]
}
Request
Headers
| Name | Type |
|---|---|
| Authorization! | Bearer |
| Content-Type | application/json |
| Accept | application/json |
| Name | Type | Description |
|---|---|---|
| partnerId | string(255)! | A unique ID assigned to our partner. |
| channelId | string(255)! | A unique ID assigned to the sales channel under the partner account. |
| orders | array! | All order-related information should be placed under this array. |
| orderNo | string(255)! | The number of the order you want to create in Cenports. This number can be nonunique account-wide, but it must be unique channel-wide. |
| customerOrderNo | string(255) | (Optional) The alternative number of the order you want to create in Cenports. This number can be nonunique account-wide, but it must be unique channel-wide. |
| orderDate | date! | Date order was placed at. |
| customerName | string(255)! | The name of the customer for this order. |
| contactName | string(255) | (Optional) The alternative name of the customer for this order. It might be useful if the name of order recipient is different than the buyer's name. |
| contactEmail | string(255) | (Optional) The contact email of the customer for this order. |
| contactPhone | string(255) | (Optional) The contact telephone number of the customer for this order. |
| shipTo | array! | All recipient-related information should be placed under this array. |
| shipTo.address1 | string(255)! | The street address of the recipient. |
| shipTo.address2 | string(255) | (Optional) The secondary street address field of the recipient. |
| shipTo.city | string(255)! | The city of the recipient's location. |
| shipTo.state | string(255)! | The state of the recipient's location. |
| shipTo.country | string(10)! | The country of the recipient's location. |
| shipTo.postalCode | string(10)! | The postal code (zip code) of the recipient's location. |
| shippingInfo | array! | All shipping related information should be placed under this array. |
| shippingInfo.carrierCode | string(255)! | The carrier code for the shipment. |
| shippingInfo.serviceLevel | string(255)! | The service level for the shipment. |
| shippingInfo.estimatedShipDate | date(Y-m-d) | The day the purchase order items are expected to ship. |
| lineItems | array! | All line items related information should be placed under this array. |
| lineItems.sku | string(255)! | The product sku. |
| lineItems.quantity | int(5)! | The quantity of the sku. |
| lineItems.consumerPrice | decimal(6, 2)! | The selling price or the charge imposed to customer for this single product. |
| lineItems.subTotal | decimal(6, 2)! | The sub total for this line item. |
| lineItems.lineNumber | int(3) | (Optional) The number of the line item. This field will auto-increment if no value is specified. |
| subTotal | decimal(6, 2) | The sub total for this order. |
| shippingCost | decimal(5, 2) | (Optional) The shipping or handling fee for this order. |
| grandTotal | decimal(6, 2)! | The grand total for this order. |
Response
HTTP Status Code: 200
{
"id": "12345",
"handle": "d93ff46f-3621-47e2-89a0-74d8caeae8a3",
"status": "PROCESSING",
"submitted_at": "2019-11-01T10:15:14.000000Z",
"completed_at": null
}
| Type | Description |
|---|---|
| TransactionStatus! | Creating orders is an asynchronous operation that will take up to 15 minutes to be finalized. The transaction returned by this API call is how clients can track the progress of the operation. Refer to theReconciliation section for more information. |
Acknowledge Orders
This endpoint allows for orders to be acknowledged
PATCH /orders/acknowledge
{
"partnerId": "111AAA",
"channelId": "ABC123",
"orders": "08557045, 19548748, CS1245948"
}
Request
Headers
| Name | Type |
|---|---|
| Authorization! | Bearer |
| Content-Type | application/json |
| Accept | application/json |
| Name | Type | Description |
|---|---|---|
| partnerId | string(255)! | A unique ID assigned to our partner. |
| channelId | string(255)! | A unique ID assigned to the sales channel under the partner account. |
| orders | string(255)! | A string of order numbers that need to be acknowledged. Numbers are separated by a comma delimiter. |
Response
HTTP Status Code: 200
{
"data": [],
"code": 200,
"status": "success",
"message": "OK"
}
Sales Channel
Get Sales Channels
This endpoint shows all sales channels on Cenports that belong to the partner
GET /channels
Request
Headers
| Headers | Type |
|---|---|
| Authorization | Bearer |
Query Parameters
| Name | Type | Description |
|---|---|---|
| partnerId | string(255)! | A unique id assigned to partner |
Response
{
"data": [
{
"channelName": "Test Channel 1",
"channelId": "MCCH",
"channelEmail": "integrations@cenports.com",
"channelPhone": "9999999999",
"location": "Hayward, CA, US, 94545",
"features": null
},
{
"channelName": "Amazon Seller Central",
"channelId": "AMAZON",
"channelEmail": "amazon@cenports.com",
"channelPhone": "8888888888",
"location": "Hayward, CA, US, 94545",
"features": null
}
]
}
Create Sales Channel
This endpoint allows partners to create a new sales channel on Cenports
POST /channels
Request
Headers
| Headers | Type |
|---|---|
| Authorization | Bearer |
{
"partnerId": "111AAA",
"channelId": "ABC123",
"channelName": "New Channel",
"contactEmail": "jon@email.com",
"contactPhone": "1112223333",
"contactInfo": {
"address": "1742 Sabre Street",
"city": "Hayward",
"state": "CA",
"country": "US",
"postalCode": "94545"
},
"billInfo": {
"name": "Co",
"email": "bill@email.com",
"phone": "1112223333",
"address": "1742 Sabre Street",
"city": "Hayward",
"state": "CA",
"country": "US",
"postalCode": "94545"
},
"logo": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAA..."
}
Body
| Name | Type | Description |
|---|---|---|
| partnerId | string(255)! | A unique id assigned to partner |
| channelId | string(255) | (Optional) A unique id assigned to the new sales channel under partner's account. It must be unique if it present in the request. Otherwise, we'll generate a random id for this sales channel. |
| channelName | string(255)! | Name of the new sales channel |
| contactEmail | string(255)? | (Conditional) Email address of the contact person for this sales channel. Required if the contactPhone field is missing in the request. |
| contactPhone | string(255)? | (Conditional) Telephone number of the contact person for this sales channel. Required if the contactEmail field is missing in the request. |
| contactInfo | array! | All contact-related information will be placed in this array. |
| contactInfo.Address | string(255)! | The contact address for this sales channel. |
| contactInfo.City | string(255)! | The city of the contact address located. |
| contactInfo.State | string(20)! | The state or province of the contact address located. |
| contactInfo.Country | string(2)! | The country of the contact address located. |
| contactInfo.postalCode | string(10)! | The postal code (zip code) of the contact address located. |
| billInfo | array | All billing-related information will be placed in this array |
| billInfo.name | string(255) | The name of the billing. |
| billInfo.email | string(255) | The contact email of the billing. |
| billInfo.phone | string(255) | The contact phone of the billing. |
| billInfo.address | string(255) | The address of the billing. |
| billInfo.city | string(255) | The city of where the billing address located. |
| billInfo.state | string(255) | The state or province of where the billing address located. |
| billInfo.country | string(255) | The country of where the billing address located. |
| billInfo.postalCode | string(255) | The postal code or zip code of where the billing address located. |
| logo | base64 string | The base64-encoded logo image for this sales channel. It is required if you want to customize the shipping label or packing slip. Acceptable format: jpg, jpeg, png, svg |
Response
{
"message": "Success! Your request has been processed successfully!",
"data": {
"partnerId": "111AAA",
"channelId": "ABC123",
"channalName": "New Channel"
}
}
| Type | Description |
|---|---|
| message | You'll receive a message like this: Success! Your request has been processed successfully! if the sales channel has been created successfully. |
| data | The Partner ID, Channel ID and Channel Name will be shown on the data section if the sales channel has been created successfully. |
Shipments
Get Shipments
{
"partnerId": "111AAA",
"channelId": "ABC123",
"orders": [
{
"orderNo": "A12345",
}
],
"startDate": "2019-11-02",
"endDate": "2019-11-05",
"limit": 50,
"acknowledged": false
}
This endpoint returns the shipments associated with the provided orders.
GET /shipments
| Headers | Type |
|---|---|
| Authorization | Bearer |
| Parameters | Type | Required |
|---|---|---|
| partnerId | string(255) | Yes |
| channelId | string(255) | Yes |
| orders | array | No |
| orders.orderNo | string(255) | No |
| startDate | date(Y-m-d) | No |
| endDate | date(Y-m-d) | No |
| limit | int(2) | No |
| acknowledged | bool | No |
Acknowledge Shipments
This endpoint allows mark shipments as acknowledged.
PATCH /shipments/acknowledge
Request
{
"partnerId": "111AAA",
"shipments": [
{
"orderNo": "A12345"
}
]
}
Headers
| Headers | Type |
|---|---|
| Authorization | Bearer |
Body
| Name | Type | Description |
|---|---|---|
| partnerId | string(255) | A unique ID assigned to the partner. |
| shipments | array | Acknowledging multiple shipments are supported in array format. |
| shipments.orderNo | string(255) | The purchase order number of the shipment. |
Response
HTTP Status Code: 200
{
"id": "12345",
"handle": "d93ff46f-3621-47e2-89a0-74d8caeae8a3",
"status": "PROCESSING",
"submitted_at": "2019-11-01T10:15:14.000000Z",
"completed_at": null
}
| Type | Description |
|---|---|
| TransactionStatus! | Acknowledging shipments is an asynchronous operation that will take up to 15 minutes to be finalized. The transaction returned by this API call is how clients can track the progress of the operation. Refer to Reconciliation section for more information. |
Inventories
The Inventories APIs allow partners to retrieve inventory from Cenports.
Get Inventory
This is the endpoint for retrieving inventory information.
GET /inventories
{
"partnerId": "111AAA",
"channelId": "ABC123",
"warehouseCode": "ABCCODE,XYZCODE",
"actualStock": true
}
Request
Headers
| Name | Type |
|---|---|
| Authorization! | Bearer |
Parameters
Case #1 - Get available stock
| Parameters | Type | Description |
|---|---|---|
| partnerId | string(255) | Required. A unique ID assigned to our partner. |
| channelId | string(255) | Required. A unique ID assigned to the sales channel under the partner account. |
| warehouseCode | string(255) | Optional. If this field provided, only inventory belong to this/these warehouse(s) will be returned. You can provide multiple warehouses using comma as separator, e.g., "abc,xyz" |
Case #2 - Get actual stock
| Parameters | Type | Description |
|---|---|---|
| partnerId | string(255) | Required. A unique ID assigned to our partner. |
| actualStock | boolean | Required. Set this field as true |
| warehouseCode | string(255) | Optional. If this field provided, only inventory belong to this/these warehouse(s) will be returned. You can provide multiple warehouses using comma as separator, e.g., "abc,xyz" |
Available Stock refers to the inventory quantity calculated after subtracting the quantity from purchase orders that have yet to be fulfilled. For example, if you have a product with an actual stock of 100 and there is a new purchase order that purchased the product with a total quantity of 10. The available stock would be 90.
Response
{
"data": [
{
"warehouseName": "Cenports Main",
"warehouseCode": "CENPORTS",
"warehouseAddress": {
"streetAddress": "1742 Sabre Street",
"streetAddress2": null,
"city": "Hayward",
"province": null,
"provinceAbbre": "CA",
"countryCode": "US",
"country": null,
"postalCode": "94545",
"isResidential": null,
"ignoreValidation": false
},
"warehouseInventory": [
{
"productSku": "TEST-2318S",
"retailerSku": "TEST-2318S",
"productUpc": "000000000000",
"productName": "A Test Sku",
"quantity": "58",
"isDiscontinued": false,
"nextAvailabilityDate": null,
"nextAvailabileQuantity": null,
"productExtras": []
},
{
"productSku": "TEST-2318S-18",
"retailerSku": "TEST-2318S-18",
"productUpc": "111111111111",
"productName": "Another SKU",
"quantity": "20",
"isDiscontinued": false,
"nextAvailabilityDate": null,
"nextAvailabileQuantity": null,
"productExtras": []
}
]
}
],
"code": 200,
"status": "success",
"message": "OK"
}
Update Inventory
This is the endpoint for updating inventory quantities.
PATCH /inventories
{
"partnerId": "CENPORTS",
"warehouseCode": "WAREHOUSE123",
"inventories": [
{
"productSKU": "165161",
"quantity": 13,
"type": "TRUE_UP"
},
{
"productSKU": "123",
"quantity": -1,
"type": "DIFFERENTIAL"
}
]
}
Request
Headers
| Name | Type |
|---|---|
| Authorization! | Bearer |
Parameters
| Parameters | Type | Description |
|---|---|---|
| partnerId | string(255)! | Required. A unique ID assigned to our partner. |
| inventories | array! | Required. An array of the inventory quantity you want to update. |
| inventories.*.productSKU | string(255)! | Required. The SKU of the product to update the inventory for. |
| inventories.*.type | string(255)! | Required. Update type: "TRUE_UP" or "DIFFERENTIAL". |
| inventories.*.quantity | integer! | Required. Number to update to. |
Types: TRUE_UP refers to an actual quantity update. If you use TRUE_UP as the update type, it will update the inventory quantity to what is set in the quantity field.
TRUE_UP Example: If current inventory is 10 and quantity field is set to 7, the updated inventory will be 7.
Types: DIFFERENTIAL will update the quantity based on the current inventory quantity. If you set the number in the quantity field as a negative number, it will subtract from the current inventory quantity. If you set the number as a positive number, it will add to the current inventory.
Differential Example: if current inventory is 10 and the quantity field is set to -6, the updated inventory will be 4.
Response
HTTP Status Code: 200
{
"id": 201,
"handle": "95213CD1-AD6C-4D10-B0A6-0D1D7F33B380",
"status": "PROCESSING",
"submitted_at": "2021-12-17T00:11:08.000000Z",
"completed_at": null
}
| Type | Description |
|---|---|
| TransactionStatus! | Updating inventory is an asynchronous operation that will take up to 15 minutes to be finalized. The transaction returned by this API call is how clients can track the progress of the operation. Refer to theReconciliation section for more information. |
Reconciliation
Most of the POST/PUT/PATCH requests are processed asychronously and may take up to 15 minutes to be finalized. The transaction returned by those requests is how clients can keep track on the progress of the operation.
After Submission
A transactional response will be returned on all post-submissions if there is no validation error.
Here is an example of successful transactional response
{
"id": "12345",
"handle": "d93ff46f-3621-47e2-89a0-74d8caeae8a3",
"status": "PROCESSING",
"submitted_at": "2019-11-01T10:15:14.000000Z",
"completed_at": null
}
Validate Transaction
Please keep in mind that an initial transactional response does not indicate your request has been processed successfully or grant a successful status to your request. You should keep track of the progress on your requests unless the transaction is marked as a COMPLETED status.
{
"partnerId": "A1234",
"handle": "d93ff46f-3621-47e2-89a0-74d8caeae8a3"
}
GET /transaction
Request
Headers
| Name | Type |
|---|---|
| Authorization! | Bearer |
| Content-Type | application/json |
| Accept | application/json |
The
QUEUEDstatus indicates we have received your request successfully, and it is currently queued for processing.
{
"id": "12345",
"handle": "d93ff46f-3621-47e2-89a0-74d8caeae8a3",
"status": "QUEUED",
"submitted_at": "2019-11-01T10:15:14.000000Z",
"completed_at": null
}
The
PROCESSINGstatus indicates we have received your request successfully, and it is now being processing by our system.
{
"id": "12345",
"handle": "d93ff46f-3621-47e2-89a0-74d8caeae8a3",
"status": "PROCESSING",
"submitted_at": "2019-11-01T10:15:14.000000Z",
"completed_at": null
}
The
COMPLETEDstatus indicates we have received your request, and the request has been processed successfully.
{
"id": "12345",
"handle": "d93ff46f-3621-47e2-89a0-74d8caeae8a3",
"status": "COMPLETED",
"submitted_at": "2019-11-01T10:15:14.000000Z",
"completed_at": "2019-11-01T10:16:20.000000Z"
}
The
FAILEDstatus indicates we have received your request, however we are not able to fully process your request due to some unforseen logical issues or validation errors.
{
"id": "12345",
"handle": "d93ff46f-3621-47e2-89a0-74d8caeae8a3",
"status": "FAILED",
"submitted_at": "2019-11-01T10:16:14.000000Z",
"completed_at": null,
"errors": {
[
"index": 0,
"message": "The order A1234 is already existed on our system."
],
[
"index": 1,
"message": "The line item 2 of order B1234 has been rejected due to product sku does not exist."
],
[
"index": 3,
"message": "The carrier code is not valid or supported for the order D1234."
]
}
}
Body
| Name | Type | Description |
|---|---|---|
| partnerId | string(255)! | A unique id used to identify a partner. |
| handle | string! | A unique UUID-based transaction number returned from previous submission. |
Response
| Name | Description |
|---|---|
| id | A unique id assigned to the current transaction. |
| handle | A unique UUID-based transaction number assigned to the current transaction, and it is the only accepted identifier that used to keep track of your request. |
| status | The current status of your request. |
| submitted_at | The submission timestamp for your request. |
| completed_at | The completion timestamp for your request. It indicates your request has been processed successfully if this field is present. |
Note:
You'll receive errors in an errors key on the json response. The position(index) of the submitted item and error details will be listed sequentially for those items cannot be processed.
However, the errors section will not return a confirmation for those items have been processed successfully.
You should submit the request again after the indicated error(s) have been resolved.
Errors
You'll receive errors in an errors key on the json response. Below are some business and validation errors that a developer may encounter while performing API operations:
Validation Error Response Example
HTTP STATUS CODE: 422 Unprocessable Entity
{
"message": "The given data was invalid.",
"errors": {
"partnerId": [
"The partner id is not valid, please try again."
],
"channelId": [
"The partner id does not exist, please try again."
]
}
}
Business Error Response Example
HTTP STATUS CODE: 400 Bad Request
{
"code": "50001",
"message": "Sorry, we're unable to process your request at this moment.",
"errors": [
{
"The orderNo A1234 is not able to update."
},
]
}
Error Codes
Frequently Asked Questions
General
How can I sign up for a developer key?
If you are interested in integrating with Cenports's APIs, please reach out to our integration team at integrations@cenports.com and an integration manager will contact you with next steps. Note that immediate support for an integration might not be available, due to resource constraints.
Do you have code samples in language...?
If the language you're working in isn't included in these documents we haven't yet written as sample in it. If you have a suggestion for another language to include please reach out to your integration contact at Cenports.
Why are we getting 429 Too Many Requests sometimes?
There is default limit of 60 requests per minute. If your integration will need to hit our services more often than that please reach out to your integration contact at Cenports.
Why does my GET call only return 30 items?
As we mentioned on the above sections, the default limit for a single request will only return 30 items unless you specified a higher value than that. The maximum limit of all initial accounts is 300. If you would like to request for a higher limitation, please reach out to your integration contact at Cenports.
How do I know if my request (POST/PATCH) is successfully being received by Cenports?
HTTP Status Code: 200 Success
{
"id": "12345",
"handle": "d93ff46f-3621-47e2-89a0-74d8caeae8a3",
"status": "PROCESSING",
"submitted_at": "2019-11-01T10:15:14.000000Z",
"completed_at": null
}
If you receive a message like this it is successful.
Does it mean the request has been processed successfully if Cenports has received it?
The returning transactional message does not indicate your request has been processed successfully. Most of the requests are processing asynchronously, which may take up to 15 minutes to finalize. The transaction returned by the API call is how clients can track the progress of the operation. Refer to Reconciliation section for more information.
How can I keep track on the progress of my submitted request?
Our API provides you with the flexibility to keep track on the request progress via Transaction Validation (/transaction) endpoint. Please refer to Reconciliation section for further details.