0% found this document useful (0 votes)
157 views

RCL API Docs

This API documentation provides information about accessing the Red Carpet Logistics API. It describes how to get an access token which can then be used to call authorized endpoints. One such endpoint allows 3PLs to update package statuses by passing an array of AWBs with the relevant status and notes for each. The documentation provides examples and describes the expected success and error responses.

Uploaded by

witdya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
157 views

RCL API Docs

This API documentation provides information about accessing the Red Carpet Logistics API. It describes how to get an access token which can then be used to call authorized endpoints. One such endpoint allows 3PLs to update package statuses by passing an array of AWBs with the relevant status and notes for each. The documentation provides examples and describes the expected success and error responses.

Uploaded by

witdya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

API Documentation

Version 1.0
( http://api-dev.rcl.co.id/api/v1/documentation )

IT Team
Red Carpet Logistics
Base URL:

 Sandbox: http://api-dev.rcl.co.id/api/v1
 Production: http://api.rcl.co.id/api/v1

1. Authorization – Get Access Token

Title Get Access Token


Note: Use this endpoint to get access token, which will be used to access
authorized endpoint. Put the access token on the header request.

URL /oauth/access_token

Method POST

Data Body
Params {
"grant_type": [string],
"client_id": [string],
"client_secret": [string],
"scope": [string]
}

Data example
{
"grant_type": "client_credentials",
"client_id": "3pl_abc",
"client_secret": "1q2w3e4r5t6y7u8i9o",
"scope": "3pl"
}

Success Code: 200


Response Content:
{
"access_token": "1Vf9HXgZhXFmfT8izVVsc8OISgiFo3bnqkp4EuNu",
"token_type": "Bearer",
"expires_in": 2592000
}

Error Code: 500 Internal Server Error


Response Content:
{
"message": "Client authentication failed.",
"status_code": 500
}
Notes We recommend to save the access token on your server side. It can be
used multiple times and expires in 30 days. You can get access token
again when having 401 error response code.

2. 3PL Update Package Status

Title 3PL Update Package Status


Note: This is an authorized endpoint. Use this endpoint to update 3PL
package status.

URL /couriers/package/update

Method POST

Data Params Header


Authorization: Bearer [access_token]
Content-Type: application/json

Body (array of awb)


[
{
"awb": [string],
"status": [string],
"notes": [string]
},
{
"awb": [string],
"status": [string],
"notes": [string]
}
]

Data Example

Header
Authorization: Bearer 1Vf9HXgZhXFmfT8izVVsc8OISgiFo3bnqkp4EuNu
Content-Type: application/json

Body (array of awb)


[
{
"awb": 123123123,
"status": "Delivered",
"notes": "Receiver: Budi. Relation: Orang Tua."
},
{
"awb": 456456456,
"status": "Delivered",
"notes": "Receiver: Tuti. Relation: Pembantu Rumah
Tangga."
}
]

Success Code: 200


Response Content:
{
"status": "SUCCESS",
"message": "Package status successfully updated"
}

Error Code: 400 Bad Request


Response Content:
{
"status": "ERROR",
"message": {
"0.awb": [
"The selected 0.awb is invalid."
],
"1.awb": [
"The selected 1.awb is invalid."
]
}
}

Code: 401 Unauthorized


Content:
{
"message": "The resource owner or authorization server
denied the request.",
"status_code": 401
}

You might also like