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.
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
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
• Retrieve RAM details using below details
https://<........>/api/v1/rmas?id=2408-206&responseFilter= Details
• Retrieve RAM summary using below details
https://<........>/api/v1/rmas?id=2408-206&responseFilter= Summary
Sample Response
Success Response
{
"requestIdentifier" : "01749ea2-4b8f-4f3d-a9dc-f0b862a3d72e",
"transactionDate" : "2017-01-20T15:12:54-05:00",
"success" : true,
"rma" : [{
"rmaId" : "0001-1456",
"rmaNumber" : "1950",
"affiliatedMerchant": "Merchant",
"status" : "Approved",
"createdDate" : "2017-03-29T00:00:00",
"shippingService" : "FDXG",
"shippingCost" : 12.47,
"returnEmployeeId" : "test.user"
"returnEmployeeName" : "Jhn Smith",
"shipToAddressId" : "1",
"shippingCostResponsibility" : "RETAILER",
"externalASNId" : "0001-0003-1950",
"customer" : {
"firstName" : "Sangita Patil",
"lastName" : "Sangita Patil",
"addressLine1" : "404 Beam Dr",
"addressLine2" : "Apt 2",
"city" : "PITTSBURGH",
"stateCode" : "PA",
"zipCode" : "15236-4562",
"countryCode" : "US",
"phoneNumber" : "4123456789",
"emailAddress" : "sangeetap85@yahoo.com"
},
"orders" : [{
"orderNumber" : "0001-0001-H0227171107",
"orderDate" : "2017-02-27",
"items" : [{
"sku" : "003-003-0001",
"quantity" : 1,
"returnItemInfo" : {
"returnReason" : "WI"
}
}
]
}
],
"label" : {
"id" : 12300,
"labelURL" : "http://hcdevweb.genco.com/commerce/services/labels/12300",
"trackingNumber" : "795490675459"
}
}, {
"rmaId" : "0001-1457",
"rmaNumber" : "1951",
"status" : "Approved",
"createdDate" : "2017-03-29T00:00:00",
"customer" : {
"firstName" : "Sangita Patil",
"lastName" : "Sangita Patil",
"addressLine1" : "404 Beam Dr",
"city" : "PITTSBURGH",
"stateCode" : "PA",
"zipCode" : "15236-4562",
"countryCode" : "US",
"phoneNumber" : "4123456789",
"emailAddress" : "sangeetap85@yahoo.com"
},
"shippingService" : "FDXG",
"shippingCost" : 12.47,
"returnEmployeeName" : "null null",
"shipToAddressId" : "1",
"shippingCostResponsibility" : "RETAILER",
"orders" : [{
"orderNumber" : "0001-0001-H0226171106",
"orderDate" : "2017-02-26",
"items" : [{
"sku" : "003-003-0001",
"quantity" : 1,
"returnItemInfo" : {
"returnReason" : "DNF"
}
}
]
}
],
"label" : {
"id" : 12301,
"labelURL" : "http://hcdevweb.genco.com/commerce/services/labels/12301",
"trackingNumber" : "795490675780"
}
}
],
"paging" : {
"previous" : "http://hcdevweb.genco.com/rms/services/rma/getRmaService?pageLimit=15&responseFilter=Details&prevTimestamp=1490810481000",
"next" : "http://hcdevweb.genco.com/rms/services/rma/getRmaService?pageLimit=15&responseFilter=Details&nextTimestamp=1493923012000"
},
"errors" : [{
"code" : "ERR-RMS-0001",
"description" : "This is an error"
}]
}
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. | Y | Y (Optionally required) |
status | String | Status of RMAs. Valid Values: Approved, Received, Cancelled |
N | Y (Optionally required) |
rmaNumber | String | RMA Number. This parameter allows up to 25 comma-separated IDs. | Y | 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 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 |
shippingService | String | The shipping service used to ship the return. Valid Values: FDXE, FDXG, FDSP, OTHER |
Details |
shippingCost | Number | The final price to ship the return to the destination. | Details |
returnEmployeeId | String | Employee ID of your representative who is permitted return product on behalf of the company. | Details |
returnEmployeeName | String | First and last names of your representative who is permitted to return product on behalf of the company. | 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 functionwill be ignored. If Null the system will use the proximity by miles function to select the appropriate return address. Valid Data: All eligible address IDs must be listed in FedEx Fulfillment. |
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 |
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 |
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 | |
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 |
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 |
label | |||
id | Number | Identifier for the label. | Summary/Details |
labelUrl | String | Label API URL to access this label. | Summary/Details |
trackingNumber | String | Tracking number for this label. | Summary/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-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 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. |