Available APIs
Authentication - OAuth2.0
Inventory
Items
Inbound Shipments
Labels
Receipt
Location
Tracking
Document
Get RMA
Retrieves RMA or list of RMAs based on the query parameters provided in the request.To take advantage the enhanced RMA functionalities, make sure you subscribe to both “Returns 1.0.0” and “Returns 2.0.0” in the API Developer Portal
Swagger
swagger: '2.0'
info:
x-ibm-name: rmas
title: Rmas
version: 2.0.0
schemes:
- https
host: $(catalog.host)
basePath: /v2
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
paths:
/rmas:
get:
responses:
'200':
description: 200 OK
parameters:
- name: accessToken
type: string
required: false
in: header
- name: id
type: string
required: false
in: query
description: 2408-2103
- name: status
type: string
required: false
in: query
description: Canceled or Approved
- name: createTimestamp
type: string
required: false
in: query
description: 'ge|7C2017-03-01T14:30:59-05:00'
- name: lastUpdatedTimestamp
type: string
required: false
in: query
description: 'ge|7C2017-03-01T14:30:59-05:00'
- name: responseFilter
type: string
required: false
in: query
description: Details
- name: pageLimit
type: integer
required: false
in: query
format: int64
description: '5'
- name: prevTimeStamp
type: string
required: false
in: query
description: '1481059745000'
- name: nextTimeStamp
type: string
required: false
in: query
description: '1481059745000'
summary: Get RMA
description: Retrieves rma or list of rmas based on the query parameters provided in the request. .
Sample Request
• Get all RMAs, limit to 15 per page, with details information.
https://<........>/api/v2/rmas?pageLimit=15&responseFilter=Details
• Get all RMAs, with a created time greater than or equal to given date, with summary information.Get
https://<........>/api/v2/rmas?createdTimestamp=ge|2017-03-17T12:00:00-05:00&responseFilter=Summary
Sample Response
Success Response
{
"requestIdentifier": "01749ea2-4b8f-4f3d-a9dc-f0b862a3d72e",
"transactionDate": "2017-01-20T15:12:54-05:00",
"success": true,
"rmas": [{
"rmaId": "0001-1456",
"rmaNumber": "1950",
"affiliatedMerchant": "Gilt",
"status": "Approved",
"createdDate": "2017-03-29T00:00:00",
"returnEmployeeId": "test.user",
"returnEmployeeName": "Jhn Smith",
"shippingCostResponsibility": "RETAILER",
"externalASNId": "0001-0003-1950",
"customer": {
"firstName": "John",
"lastName": "Smith",
"addressLine1": "1020 Orchard St",
"addressLine2": "",
"city": " Sacramento ",
"stateCode": "CA",
"zipCode": "95814",
"countryCode": "US",
"phoneNumber": "888-787-8888",
"emailAddress": "test85@gmail.com"
},
"declaredValue": 19.99,
"referenceFields": {
"customerReference": "1234",
"departmentNumber": "10",
"invoiceNumber": "inv100",
"poNumber": "PO123"
},
"shipments": [{
"status": "Approved",
"shippingService": "FDXG",
"shippingCost": 20.83,
"shipToAddressId": "1",
"orders": [{
"orderNumber": "0001-0001-H0227171107",
"orderDate": "2017-02-27",
"items": [{
"sku": "003-003-0001",
"quantity": 1,
"returnItemInfo": {
"returnReason": "WI"
}
}]
}],
"label": {
"id": "12300",
"labelURL": "http://<.........>/api/v1/labels/15050",
"trackingNumber": "795490675459"
}
}],
"paging": {
"previous": "https://<.......>/api/v2/rmas?pageLimit=15&responseFilter=Details&prevTimestamp=1490810481000",
"next": " https://<.......>/api/v2/rmas?pageLimit=15&responseFilter=Details&nextTimestamp=1493923012000"
}
}]
}
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 |
Query Parameters
Parameter | Data type | Description | Multiple Values allowed | Required |
---|---|---|---|---|
id | String | RMA ID. This parameter allows up to 25 comma-separated IDs. | Y | Y (Optionally required) |
rmaNumber | String | RMA Number. This parameter allows up to 25 comma-separated IDs. | Y | Y (Optionally required) |
status | String | Status of RMAs. Valid Values: Approved, Received, Cancelled |
N | Y (Optionally required) |
createTimestamp | String | Time stamp (ISO8601 format) created by orders, preceded by condition type and delimited by pipe symbol. Format: ge|2016-09-21T14:30:59-05:0 Valid Values for Condition Type: gt (greater than), lt (less than), eq (equal to), ge (greater than equal to), le (less than equal to) |
N | N |
lastUpdatedTimestamp | String | Last updated time stamp (ISO8601 format), preceded by condition type AND delimited by pipe symbol. Format: ge|2016-09-21T14:30:59-05:00 Valid Values for Condition Type: gt (greater than), lt (less than), eq (equal to), ge (greater than equal to), le (less than equal to) |
N | N |
responseFilter | String | Default is Summary. Basic fields will be returned for all the response filters. Valid Values: Summary, Details |
N | N |
pageLimit | Number | The number of records to be retrieved in each page. Allowed values: 1 to 100. Default is 50. |
N | N |
prevTimestamp | String | Time stamp to retrieve the previous page. Not applicable for initial request | N | N |
nextTimestamp | String | Time stamp to retrieve the next page. Not applicable for initial request | N | N |
Response Attribute
Parameter | Data type | Description | Filter Type |
---|---|---|---|
requestIdentifier | String | Request identifier. | Summary/Details |
transactionDate | Date | Transaction date/time. | Summary/Details |
success | boolean | Status of the transaction Valid Values: true or false |
Summary/Details |
rma[] | |||
rmaId | String | Unique identifier assigned at RMA creation. | Summary/Details |
rmaNumber | String | The reference number assigned to the return. | Summary/Details |
affiliatedMerchant | String | The affiliated merchant the RMA is being created for. This field must match with the affiliated merchant field configured in the Retailers Configuration screen. | Summary/Details |
status | String | Status of the RMA. | Summary/Details |
createdDate | String | The date when the RMA was recorded. | Summary/Details |
returnEmployeeId | String | Employee ID of your representative who is permitted return product on behalf of the company. | Details |
returnEmployeeName | String | As a merchant if you want to list an employee who may be return items on behalf of the company you will list the First and last names of your representative who is permitted to return product on behalf of the company. | Details |
shippingCostResponsibility | String | If the merchant's system decides who is responsible for the cost of the shipment, it will be depicted here. Valid Data: Consumer, Retailer |
Details |
externalASNId | String | If an ASN was created by the host system of the merchant, the ID can be passed to be used a link to the receiving party. | Details |
casAccountNumber | Number | The Commercial Account Services (CAS) number sent to depict which account number to use during the receipt of this return. | Details |
billToFirstName | String | The bill-to first name for this return. | Details |
billToLastName | String | The bill-to last name for this return. | Details |
billToAddressLine1 | String | The bill-to address 1 for this return. | Details |
billToAddressLine2 | String | The bill-to address 2 for this return. | Details |
billToCity | String | The bill-to city for this return. | Details |
billToStateCode | String | The bill-to state code for this return. | Details |
billToZipCode | String | The bill-to zip code for this return. | Details |
specialtyFlag | String | Indicates do not credit, early credit, or gift return for this return. | Details |
declaredValue | Number | The declared value for the return. | Details |
rmas[].referenceFields | |||
customerReference | String | The customer reference number field for the return. | Details |
departmentNumber | String | The department number reference field for the return. | Details |
invoiceNumber | String | The invoice number reference field for the return. | Details |
poNumber | String | The purchase order reference field for the return. | Details |
rmas[].customer | |||
firstName | String | First name of the consumer requesting the return. | Summary/Details |
lastName | String | Last name of the consumer requesting the return. | Summary/Details |
addressLine1 | String | First line of the address of the consumer requesting the return. | Details |
addressLine2 | String | Second line of the address of the consumer requesting the return. | Details |
city | String | City of the consumer requesting the return. | Summary/Details |
stateCode | String | State of the consumer requesting the return. | Summary/Details |
zipCode | String | Zip code of the consumer requesting the return. | Details |
countryCode | String | Country of the consumer requesting the return. | Details |
phoneNumber | String | Phone number of the consumer requesting the return. | Details |
emailAddress | String | Email address of the consumer requesting the return. This email address will be used for any auto-notifications or sending of a label for the return. | Details |
rmas[].shipments[] | |||
status | String | The status of the individual shipment in the RMA. Valid Values:Created, Received |
Summary/Details |
shippingService | String | The FedEx shipping service used to complete the return of the item. Valid Values:FDXE, FDXG, FDSP, OTHER. |
Details |
shippingCost | String | The final price to ship the return to the destination. | Details |
shipToAddressId | String | A merchant can choose a specific location where an item will be returned directly. If set in this field, the proximity by miles function will be ignored. If this field is null, the system will use the proximity by miles functionto select the appropriate return address. Valid Values: All eligible address IDs must be listed in the commerce platform. |
Details |
shipToAddressName | String | The address name where the returned item will be shipped. | Details |
rmas[].shipments[].label | |||
id | String | The unique identifier that depicts the row where the label is stored in the system. Will be passed in the label URL to obtain the label PDF. | Summary/Details |
labelURL | String | If a label was requested, the URL for the label PDF is listed here. | Summary/Details |
trackingNumber | String | The tracking number assigned to the label used for the return. | Summary/Details |
rmas[].shipments[].orders[] | |||
orderNumber | String | The original order number to which the item being returned belongs. This number will be stored in the RMA record being created to allow a reference back from the merchant's order management system | Details |
orderDate | String | Details | |
rmas[].shipments[].orders[].items[] | |||
sku | String | The SKU assigned to the item by the retailer. | Summary/Details |
quantity | Number | The quantity of the item expected for return. | Summary/Details |
rmas[].shipments[].orders[].items[].returnItemInfo | |||
returnReason | String | The reason the consumer is returning the item. | Details |
finalSale | Boolean | Indicates whether the item was in a final sale status when it was sold. | Details |
paging | |||
previous | String | Link to retrieve the previous page, if applicable. | Summary/Details |
next | String | Link to retrieve the next page, if applicable. | Summary/Details |
errors[] | |||
Code | String | Code associated with the error. | Summary/Details |
Description | String | Description of the error. | Summary/Details |
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-0008 | Create RMA version 1 cannot be used with Retailer configuration of One Item per Single Box. Please upgrade to version 2. |
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-0024 | Invalid affiliatedMerchant field: the value does not match with the one defined in the Retailer screen. |
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. |