Cancel Appointments

This API cancels an existing appointment. If the appointment cannot be canceled, the API call will return an error.

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/{appointmentId}/cancel':
    post:
      responses:
        '200':
          description: 200 OK
      summary: 'This API cancels an existing appointment. If the appointment cannot be canceled, the API call will return an error'
      parameters:
        - name: AccessToken
          type: string
          required: false
          in: header
          description: 'Enter AccessToken, it is mandatory in case of basic authentication.'
        - name: appointmentId
          type: string
          required: true
          in: path
          description: Enter appointmentId
        - name: UpdateAppointments_json_body
          required: true

      

Sample Request

         
Request URL:- https://<........>/api/v1/appointments/{appointmentId}/cancel

Payload:-
{
    "cancellationReason": "CLT",
    "cancellationNotes": "Carrier is arriving late"
}


 
      

Sample Response

Success Response

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


      

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

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
cancellationReason String

Cancellation reason.

Y
cancellationNotes String

Cancellation 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.