Get Appointments

This API retrieves a list of appointment objects or an individual appointment object .

Swagger

         
swagger: '2.0'
info:
  x-ibm-name: appointments
  title: Appointments
  version: 1.0.0
schemes:
  - https
host: $(catalog.host)
basePath: /v1
consumes:
  - application/json
produces:
  - application/json
  - fsc-api-admin@fedex.com
  - satayoday.sinha@fedex.com
securityDefinitions:
  oauth2:
    type: oauth2
    description: Enter Access token
    flow: accessCode
    scopes:
      Fulfillment_Returns: 'Read/Write access to Orders, Items, RMAs, Inventory,ASN ,Inbound Shipments and Appointments objects'
    authorizationUrl: 'https://<........................>/fsc/oauth2/authorize'
    tokenUrl: 'https://<........................>/fsc/oauth2/token'
    x-tokenIntrospect:
      url: 'https://<........................>/fsc/oauth/introspect'
  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_Secret: []
    oauth2:
      - Fulfillment_Returns
    Client_Id: []
x-ibm-configuration:
  testable: true
  enforced: true
  phase: realized
paths:
  '/appointments':
    get:
      responses:
        '200':
          description: 200 OK
      summary: This API retrieves a list of appointment objects or an individual appointment object in the Platform
      parameters:
        - name: AccessToken
          type: string
          required: false
          in: header
          description: 'Enter AccessToken, it is mandatory in case of basic authentication.'
        - name: query_params
          type: string
          required: true
          in: query
          description: 'Enter all the query parameters. Sample:-appointmentId=010201-031219-355,010201-031219-357'

      

Sample Request

         
	•	Retrieve appointment details using appointment id
	https://<........>/services/appointments?appointmentId=010201-031219-355,010201-031219-357
	
 
      

Sample Response

Success Response

         
	  
	  {
    "requestIdentifier": "01749ea2-4b8f-4f3d-a9dc-f0b862a3d72e",
    "transactionDate": "2019-06-20T15:12:54-05:00",
    "status": true,
    "appointments": [
        {
            "appointmentId": "010201-031219-355",
            "appointmentDttm": "2019-06-8T00:00:00-05:00",
            "duration": 120,
            "appointmentStatus": "Canceled"
        },
        {
            "appointmentId": "010201-031219-357",
            "appointmentDttm": "2019-06-8T00:00:00-05:00",
            "duration": 120,
            "appointmentStatus": "Scheduled"
        }
    ]
}


      

Error Response

Error Response

         
{
     
   "requestIdentifier": "01749ea2-4b8f-4f3d-a9dc-f0b862a3d72e",
   "transactionDate": "2019-06-20T15:12:54-05:00",
   "status": false,
   "errors": [
        {
            "code": "ERR-APT-0009",
            "description": "Invalid Appointment Id"
        }
    ]
}



      

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

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 Attributes

Parameter Data type Description Required
appointmentId String

Appointment IDs.

N
appointmentType String

Appointment types.

N
facility String

Optional. Facility code where the appointment is scheduled.

N
loadType String Load type for the appointment. N
pageLimit Number

The number of records to be retrieved on each page.

Valid Values: 1 to 100. Default is 50.

N
offset String

Offset value to be passed to retrieve the previous/next page. Not applicable for initial request.

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
appointments[] Array

List of appointments.

appointmentId String 

Appointment Id – unique identifier.

appointmentDttm String

Date of appointment.

duration String

Duration of the appointment.

appointmentStatus String

Appointment status. Indicates whether the appointment is created or not. 

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-CMR-0001 Input data validation failed.
ERR-CMR-0002 Authentication Failed. Invalid Access Token.
ERR-CMR-0003 Missing mandatory fields.
ERR-APT-0002 Appointment Date missing.
ERR-APT-0003 Facility missing.
ERR-APT-0004 Load Type missing.
ERR-APT-0005 Trailer Type missing.
ERR-APT-0006 Pallet Height missing.
ERR-APT-0007 Number of Pallets missing.
ERR-APT-0008 Number of Cases missing.
ERR-APT-0009 Invalid Appointment Type.
ERR-APT-0010 Invalid Appointment Date.
ERR-APT-0011 Invalid Facility.
ERR-APT-0012 Invalid Load Type.
ERR-APT-0013 Invalid Trailer Type.
ERR-APT-0014 Invalid Pallet Height.
ERR-APT-0015 Invalid Object Type.
ERR-APT-0016 Requested appointment time is not available.
ERR-APT-0017 Invalid Object Id.
ERR-APT-0018 Invalid Request.
ERR-APT-0019 Invalid Cancellation Reason.
ERR-APT-0020 Invalid Appointment Status.
ERR-APT-0021 No Appointment Found.
ERR-APT-0022 Appointment Not Scheduled, Cannot Be Cancelled.
ERR-APT-0023 Invalid Duration.
ERR-APT-0024 Appointment Date Cannot Be Past Date.
ERR-APT-0025 Trailer Number Missing.
ERR-APT-0026 Retailer not authorized to modify this appointment.
ERR-MAC-0001 This transaction is not authorized at master account.
ERR-MAC-0002 Required marketplaceRetailerId is missing in the request header.
ERR-MAC-0003 The marketplaceRetailerId is not associated with the retailer Id.