Get Receipt

Retrieves the receipt information: item returned, item quantity, RMA, FedEx Office store where the product was returned, and when and who received the product at the FedEx Office store.

Swagger

         
swagger: '2.0'
info:
  x-ibm-name: receipts
  title: Receipts
  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://<...........................>/api/test/fsc/oauth2/authorize'
    scopes:
      Fulfillment_Returns: 'Read/Write access to Orders, Items, RMAs, Inventory,location,tracking objects'
    tokenUrl: 'https://<...........................>/api/test/fsc/oauth2/token'
  Client_Screte:
    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_Screte: []
    oauth2:
      - Fulfillment_Returns
x-ibm-configuration:
  testable: true
  enforced: true
  phase: realized
paths:
  /receipts:
    get:
      responses:
        '200':
          description: 200 OK
      operationId: ''
      consumes: []
      parameters:
        - name: accessToken
          type: string
          required: false
          in: header
          description: 'Enter AccessToken, it is mandatory.'
        - name: nextTimestamp
          type: string
          required: false
          in: query
          description: '1479495671089'
        - name: prevTimestamp
          type: string
          required: false
          in: query
          description: '1479495671089'
        - name: receiptId
          type: string
          required: false
          in: query
          description: '140'
        - name: pageLimit
          type: string
          required: false
          in: query
          description: '5'
		- name: createdDate
          type: string
          required: false
          in: query
          description: 'ge|7C2017-03-01T14:30:59-05:00'
		- name: inductionDate
          type: string
          required: false
          in: query
          description: 'ge|7C2017-03-01T14:30:59-05:00'
		- name: deliveredDate
          type: string
          required: false
          in: query
          description: 'ge|7C2017-03-01T14:30:59-05:00'
	  summary: Get Receipts
      description: Retrieves  the receipt information-Item returned, Item quantity, RMA, FXO Store where the product was returned, when & who received the product at FXO store to the retailer. 

      

Sample Request

         
	•	Retrieve receipt data using receiptId.
		https://<........>/api/v1/receipts?receiptId=395,396,397
	•	Retrieve all receipt data based on receipt created date on or after the time stamp provided .
		https://<........>/api/v1/receipts?receiveDate=ge|2016-09-21T14:30:59-05:00
	•	Retrieve all receipt data based on combination conditions of receipt created date and storeId. 
		https://<........>/api/v1/receipts?receiveDate=ge|2016-09-21T14:30:59-05:00&storeId=999999999	
 
      

Sample Response

Success Response

         
{
	"success" : true,
	"requestIdentifier" : "01749ea2-4b8f-4f3d-a9dc-f0b862a3d72e",
	"transactionDate" : "2017-01-20T15:12:54-05:00",
	"receipts" : [{
			"receiptId" : "395",
			"sku" : "sku1",
			"skuDescption" : "",
			"rmaId" : "12234444",
			"rmaNumber" : "1338",
			"rmaStatus" : "Approved",
			"referenceNumber" : "122334545656",
			"receiptType" : "DTV",
			"merchantName" : "Fred's Store",
			"orderNumber" : "12333444-122",
			"serialNumber" : null,
			"shipmentId" : "12344-2332-333",
			"trackingNumber" : null,
			"receivedDate" : "2017-01-24T13:43:22",
			"inductionDate" : "2017-01-25T13:43:22",
			"deliveredDate" : "2017-01-27T13:43:22",
			"storeAddress" : {
				"storeId" : "1234",
				"city" : "Columbus",
				"state" : "OH"
			},
			"senderAddress" : {
				"name" : "John Smith",
				"city" : "Portaland",
				"state" : "OR",
				"zip" : "97035"
			},
			"destinationAddress" : {
				"addressId" : "CMH",
				"name" : null,
				"city" : "Columbus",
				"state" : "OH"
			}
		}, {
			"receiptId" : "396",
			"sku" : "sku2",
			"skuDescption" : "",
			"rmaId" : "12234488",
			"rmaNumber" : "1339",
			"rmaStatus" : "Approved",
			"receiptType" : null,
			"referenceNumber" : "122334545656",
			"merchantName" : "Fred's Store",
			"orderNumber" : "12333444-122-233",
			"serialNumber" : "12233",
			"shipmentId" : "12344-2332-4444",
			"trackingNumber" : "1232334",
			"receivedDate" : "2017-01-22T13:43:22",
			"inductionDate" : "2017-01-24T13:43:22",
			"deliveredDate" : "2017-01-26T13:43:22",
			"storeAddress" : {
				"storeId" : "1234",
				"city" : "Columbus",
				"state" : "OH"
			},
			"senderAddress" : {
				"name" : "John Smith",
				"city" : "Portaland",
				"state" : "OR",
				"zip" : "97035"
			},
			"destinationAddress" : {
				"addressId" : "CMH",
				"name" : null,
				"city" : "Columbus",
				"state" : "OH"
			}
		}
	],
	"paging" : {
		"previous" : "https://<.........>/api/v1/receipts?pageLimit=25&prevTimestamp=12309820234",
		"next" : "https://<............>/api/v1/receipts?pageLimit=25&nextTimestamp=12398723498"
	}
}

      

Error Response

      
{
	"requestIdentifier" : "01749ea2-4b8f-4f3d-a9dc-f0b862a3d72e",
	"transactionDate" : "2017-01-20T15:12:54-05:00",
	"success" : "false",
	"errors" : [{
			"code" : "ERR-CMR-0001",
			"description" : "Input data validation failed"
		}
	]
}

      

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
receiptId String The receipt ID is a one-up number that is assigned to the return when it's received at the FXO store.
Up to 25 receipt IDs can be passed .
Y N
At least one query parameter is required (receiptId, createdDate, inductionDate, deliveredDate)
createdDate String The created date (ISO8601 format) preceded by condition type delimited by pipe symbol.
Format: ge|2016-09-21T14:3059-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
At least one query parameter is required (receiptId, createdDate, inductionDate, deliveredDate)
inductionDate String The induction date (ISO8601 format) preceded by condition type delimited by pipe symbol.
Format: ge|2016-09-21T14:3059-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
At least one query parameter is required (receiptId, createdDate, inductionDate, deliveredDate)
deliveredDate String The delivered date (ISO8601 format) preceded by condition type delimited by pipe symbol.
Format: ge|2016-09-21T14:3059-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
At least one query parameter is required (receiptId, createdDate, inductionDate, deliveredDate)
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
requestIdentifier String Request identifier.
transactionDate Date Transaction date/time.
success boolean Status of the transaction
Valid Values: True or False
receipts[]    
receiptID String The ID assigned to the return when received at the FedEx Office store.
rmaId Number The RMA ID generated by the FedEx return system.
rmaNumber String The number assigned to the return when it's written to the RMA table.
rmaStatus String Status of the RMA
merchantName String Merchant name within the RMS System.
receiptType String The type of return being made. (Examples would be DTV, Uverse)
referenceNumber String Unique ID assigned to a receipt record when a transaction is done at the FedEx Office location. It will encompass all items within the return.
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.
sku String The SKU assigned to the item by the retailer
skuDescription String Short description for the catalog item.
serialNumber String Serial number captured at the FedEx Office store.
shipmentId String Shipment ID assigned by RMS system when the shipment is created at a FedEx Office store.
trackingNumber String FedEx shipping label tracking number assigned.
receivedDate String The date and time the item was received at the FedEx Office store.
inductionDate String The date and time the shipment was scanned into the FedEx Network to physically begin shipping.
deliveredDate String The date and time the shipment was delivered to the final destination.
receipts[].storeAddress    
storeId String The store ID where the item was received.
city String The city of the store is in where the receipt has been completed.
state String The state of the store is in where the receipt has been completed.
receipts[].senderAddress    
name String First and last name of the consumer requesting the return.
city String City of the consumer requesting the return.
state String State of the consumer requesting the return.
zip String Zip code of the consumer requesting the return.
receipts[].destinationAddress    
addessId String Location ID assigned to the ship to location which will be the shipments final destination.
name String Name of the ship to location
city String City of the ship to location
state String State of the ship to location
paging    
previous String Link to retrieve the previous page, if applicable.
next String Link to retrieve the next page, if applicable.
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.