Available APIs
Authentication - OAuth2.0
Inventory
Items
Inbound Shipments
Labels
Receipt
Location
Tracking
Document
Receive RMA
This API flags an existing RMA as having been received by providing the RMA ID, the items/quantities to be marked as Received. This can only be called when the RMA is not in Canceled status.
Swagger
swagger: '2.0'
info:
x-ibm-name: rmas
title: Rmas
version: 1.0.0
schemes:
- https
host: $(catalog.host)
basePath: /v1
consumes:
- application/json
produces:
- application/json
securityDefinitions:
oauth2:
type: oauth2
description: ''
flow: accessCode
authorizationUrl: 'https://<........................>/fsc/oauth2/authorize'
scopes:
Fulfillment_Returns: ''
tokenUrl: 'https://<........................>/fsc/oauth2/token'
Client_Secret:
type: apiKey
description: Enter Client Secret
in: header
name: X-IBM-Client-Secret
Client_Id:
type: apiKey
in: header
name: X-IBM-Client-Id
description: Enter Client ID
security:
- Client_Id: []
Client_Secret: []
oauth2:
- Fulfillment_Returns
x-ibm-configuration:
testable: true
enforced: true
phase: realized
'/rmas/{rmaId}/receive':
post:
responses:
'200':
description: 200 OK
parameters:
- name: receiverma_json_body
required: true
in: body
schema:
type: object
description: '{"items" : [{"sku" : "sku1","quantity" : 1}, {"sku" : "sku2","quantity" : 2}]}'
- name: AccessToken
type: string
required: false
in: header
description: 'Enter AccessToken, it is mandatory in case of basic authentication.'
- name: rmaId
type: string
required: true
in: path
description: 8057-1232
summary: Receive RMA
description: 'This API flags an existing RMA as having been received by providing the RMA ID, the items/quantities to be marked as Received. This can only be called when the RMA is not in Canceled status.'
Sample Request
{
"items" : [{
"sku" : "sku1",
"quantity" : 1
}, {
"sku" : "sku2",
"quantity" : 2
}
]
}
Sample Response
Success Response
{
"requestIdentifier": "01749ea2-4b8f-4f3d-a9dc-f0b862a3d72e",
"transactionDate": "2017-01-20T15:12:54-05:00",
"success": true,
"rma": {
"rmaId": "1234",
"rmaStatus": "Received"
}
}
Error Response
{
"requestIdentifier": "01749ea2-4b8f-4f3d-a9dc-f0b862a3d72e",
"transactionDate": "2017-01-20T15:12:54-05:00",
"success": false,
"rma": {
"rmaId": "1234",
"rmaStatus": "Canceled"
},
"errors": [{
"code": "ERR-RMA-XXXX",
"description": "RMA cannot be received. RMA is in Canceled status."
}]
}
OAuth 2.0
| HTTP Headers | Description |
|---|---|
| Authorization | You must always provide the access token for authorization to access the API. HTTP-Header Value Authorization Bearer accessToken |
| Origin | Origin URL. HTTP-Header Value Origin domain.com |
Custom authentication
| HTTP Headers | Description |
|---|---|
| X-IBM-Client-Id | You must always provide in the HTTP header your API portal application's client ID (X-IBM-Client-Id) to access the API. HTTP-Header Value X-IBM-Client-Id ************ |
| X-IBM-Client-Secret | You must always provide in the HTTP header your API portal application's client secret (X-IBM-Client-Secret) to access the API. HTTP-Header Value X-IBM-Client-Secret ************ |
| AccessToken | Application Access Token |
| Origin | Origin URL. HTTP-Header Value Origin domain.com |
Request Attribute
| Parameter | Data type | Description | Required |
|---|---|---|---|
| items[] | |||
| Sku | String | SKU of the item received at the warehouse. | Yes |
| quantity | Number | Quantity of the SKU received. | Yes |
Response Attribute
| Parameter | Data type | Description |
|---|---|---|
| requestIdentifier | String | Request identifier. |
| transactionDate | Date | Transaction date/time. |
| success | boolean | Status of the transaction Valid Values: True or False |
| rma | ||
| rmaId | Number | RMA ID. |
| rmaStatus | String | Status of the RMA. Valid Values: Approved, Received, Canceled |
| errors[] | ||
| Code | String | Code associated with the error. |
| Description | String | Description of the error. |
HTTP Status Code
| Code | Description |
|---|---|
| 200 | OK - HTTP Response for successfully processed requests |
| 400 | Bad Request. |
| 403 | Forbidden |
| 404 | Not Found - Server couldn’t find anything matching request URI |
| 500 | Internal Server Error – Unable to process the request |
Error Code
| Code | Description |
|---|---|
| ERR-SYS-0001 | Your request cannot be processed due to a system error. |
| ERR-CMR-0001 | Input data validation failed. |
| ERR-CMR-0002 | Authentication Failed. Invalid Access Token. |
| ERR-CMR-0003 | Missing mandatory fields. |
| ERR-RMA-0000 | System error message. |
| ERR-RMA-0003 | Retailer return address is missing to process return. |
| ERR-RMA-0004 | Retailer reqire RMA number. |
| ERR-RMA-0010 | Exception in creating Receipts. |
| ERR-RMA-0011 | This RMA Number is already in use. Please enter a unique RMA Number.. |
| ERR-RMA-0012 | No Rma found for the given id : {id}. |
| ERR-RMA-0013 | Exception in calling RMA oneup Service. |
| ERR-RMA-0014 | Exception in calling create action. |
| ERR-RMA-0015 | New RMA not required. No rma receipts found for rma Id: {id}. |
| ERR-RMA-0020 | Retailer not found for the request. |
| ERR-RMA-0021 | No Fedex Account is found for the given location to process return. |
| ERR-RMA-0030 | Item Details not found : {sku}. |
| ERR-RMA-0031 | Item Sku : {sku} is Marked as non returnable. |
| ERR-RMA-0033 | Item Sku : {sku} in Order: {order} can not be returned after {days} day(s) of Order. |
| ERR-RMA-0034 | New RMA not required. All the Items are alredy received {id}. |
| ERR-RMA-0040 | Error calling generate label service. |
| ERR-RMA-0050 | Error in ASN Service. |
