Create Appointments

This API creates appointments for the facility and dates provided in the request.

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://vp1npmqdp01-v1.genco.com:2443/api/test/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:
    post:
      responses:
        '200':
          description: 200 OK
      summary: This API creates appointments for the facility and dates provided in the request
      parameters:
        - name: appointments_json_body
          required: true
          in: body
          schema:
            type: object
          description: ''
        - name: AccessToken
          type: string
          required: false
          in: header
          description: 'Please pass access token, It is mandatory field'

      

Sample Request

         
{
   "appointmentType": "Live Unload",
   "facility": "HFY",
   "appointmentDttm" :"2019-06-8T00:00:00-05:00",
   "duration": 120,
   "objectType": "ASN",
   "objectIds": ["12223","3333","4444"],
   "loadType": "Pallets",
   "trailerType": "LTL",
   "palletHeight": "7 ft",
   "numberOfPallets": 1,
   "numberOfCases": 100,
   "singleSkuFlag": True,
   "trailerNumber": "123",
   "notes": ""    
}

 
      

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": "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-0002",
            "description": "Requested Appointment Time not available"
        }
    ]
}


      

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

Request Attributes

Parameter Data type Description Required
appointmentType String

Type of appointment:

• Live Unload

• Live Load

• Pickup Empty

• Pickup Load

• Drop Unload

Y
facility String

Facility code to which the appointment                                                                                                              appointment is being scheduled.

Y
appointmentDttm String

Requested appointment date/time.                                                                                                                         ISO date format.

Y
duration Number

Appointment duration based on business rules.

N
objectType String

Type of object.                                                                                                                                                   Valid Values:ASN

N
objectIds Array   N
loadType String Valid Values: Floor Loaded, Pallets. 
Required if appointmentType ="Live Unload."
N
trailerType String Valid Values: Floor Loaded, Pallets.  N
palletHeight String

Valid Values:Shipping Container, 53 ft, Parcel, LTL.

N
numberOfPallets Number Valid Values:5 ft, 7 ft. N
numberOfCases Number   N
singleSkuFlag Boolean

Valid Values: true, false.                                                                                                                                     True signifies a single SKU. False signifies mixed SKUs.

N
carrierName String

Reserved for future use.

N
proNumber String

Reserved for future use.

N
trailerNumber String   N
notes String Appointment Notes 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.