Get Documents

This API retrieves documents associated with the document ID provided in the request.

Swagger

         
swagger: '2.0'
info:
  x-ibm-name: document
  title: Document
  version: 1.0.0
schemes:
  - https
host: $(catalog.host)
basePath: /v1
consumes:
  - application/json
produces:
  - application/json  
securityDefinitions:
  oauth2:
    type: oauth2
    description: ''
    flow: accessCode
    scopes:
      Fulfillment_Returns: "Read/Write access to Orders, Items, RMAs, Inventory,ASN  and 1.1\tInbound Shipments objects"
    authorizationUrl: 'https://<.........................>/fsc/oauth2/authorize'
    tokenUrl: 'https://<.........................>/fsc/oauth2/token'    
  Client_Id:
    type: apiKey
    in: header
    name: X-IBM-Client-Id
    description: Enter Client ID
security:
  - Client_Id: []
    oauth2:
      - Fulfillment_Returns
    Client_Secret: []
x-ibm-configuration:
  testable: true
  enforced: true
paths:
  /documents/{documentId}:
   get:
      responses:
        '200':
          description: 200 OK
      parameters:
        - name: accessToken
          type: string
          required: false
          in: header
          description: 'Enter AccessToken, it is mandatory in case of basic authentication.'
        - name: documentId
          type: string
          required: true
          in: path
          description: Enter document id
      description: This API retrieves documents associated with the document ID provided in the request.
      security:
        - client_secret: []
          Client_Id: []
        - oauth2:
            - Fulfillment_Returns
      summary: Get Documents
      consumes:
        - application/json
      produces:
        - application/json

      

Sample Response

Success Response

         

{
  "requestIdentifier": "01749ea2-4b8f-4f3d-a9dc-f0b862a3d72e",
  "transactionDate": "2017-01-20T15:12:54-05:00",
  "success": true,
  "documents": [
    {
      "id": "189101901",
    "content": "<…BASE64 CONTENT…>",
      " contentType": "pdf"
    }
  ]
}


      

Sample Error Response

Error Response

         


{
  "requestIdentifier": "01749ea2-4b8f-4f3d-a9dc-f0b862a3d72e",
  "transactionDate": "2017-01-20T15:12:54-05:00",
  "success": false,
  "errors": [
    {
      "code": "ERR-SYS-0001",
      "description": "Your request cannot be processed due to a system 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

Response Attribute

Parameter Data Type Description
requestIdentifier String Request identifier
transactionDate String Transaction date/time
success Boolean Status of the transaction.
documents[]    
id String ID associated with the document.
content String Base64 encoded string of the document.
contentType String Content type of the document such as pdf, txt, jpg.
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-ASN-0005 Shipment is received by the warehouse and cannot be updated
ERR-ASN-0006 Invalid Origin facility name
ERR-ASN-0007 Origin facility name does not exist
ERR-ASN-0008 Invalid Origin address line 1 value
ERR-ASN-0009 Invalid Origin city value
ERR-ASN-0010 Invalid Origin state code
ERR-ASN-0011 Invalid Origin postal code
ERR-ASN-0012 Invalid Origin country code
ERR-ASN-0013 Invalid destination facility code
ERR-ASN-0016 Invalid container type value
ERR-ASN-0017 Invalid number of LPNs value
ERR-ASN-0018 Quantity of custom LPN IDs does not match number of LPNs ()
ERR-ASN-0019 Invalid length value
ERR-ASN-0020 Invalid width value
ERR-ASN-0021 Invalid height value
ERR-ASN-0022 Invalid weight value
ERR-ASN-0028 <Field name> - Value must be true or false
ERR-ASN-0024 Product <SKU> is not recognized in the Product Catalog
ERR-ASN-0025 Invalid quantity
ERR-ASN-0026 Invalid expiration date: <Expiration date>
ERR-ASN-0027 Expiration date is required for the product <SKU>
ERR-ASN-0028 Expiration date <Expiration date> cannot be less than current date
ERR-ASN-0029 Invalid service level <service level code>
ERR-ASN-0030 Invalid Item SKU
ERR-ASN-0031 Product <SKU> does not exist in LpnDetail record
ERR-ASN-0032 When shipping internationally, please ship with third party service
ERR-ASN-0033 Invalid Expected arrival date <Expected arrival date>
ERR-ASN-0034 Expected arrival date <Expected arrival date> cannot be less than current date
ERR-ASN-0035 Invalid Inbound carrier name
ERR-ASN-0036 Invalid Contact name
ERR-ASN-0037 Invalid Phone number
ERR-ASN-0038 Invalid Pickup date
ERR-ASN-0039 Invalid Pickup start time
ERR-ASN-0040 Pickup start time should be less than end time
ERR-ASN-0041 Invalid Pickup end time
ERR-ASN-0042 Multiple container type values found
ERR-ASN-0043 Inbound shipment already exists
ERR-ASN-0044 Update failed because inbound shipment status does not allow updates
ERR-ASN-0045 Shipping section cannot be empty for this inbound shipment
ERR-ASN-0046 Inbound shipment does not exist
ERR-ASN-0047 Connection is inactive
ERR-ASN-0048 There is an address error on your origin facility
ERR-ASN-0049 Shipping information is missing for this inbound shipment
ERR-ASN-0051 Pallet information is missing
ERR-ASN-0052 Rates cannot be retrieved due to invalid shipment status
ERR-ASN-0053 Required fields are missing
ERR-ASN-0054 Bill of Lading document is not generated at this time. Please try after some time.
ERR-ASN-0055 Lot number provided for a product which has Batch/Lot not enabled
ERR-ASN-0056 Invalid Origin Contact Name
ERR-ASN-0057 Invalid Origin Contact Phone number
ERR-ASN-0058 Invalid Email address format