Available APIs
Authentication - OAuth2.0
Inventory
Items
Inbound Shipments
Labels
Receipt
Location
Tracking
Document
GET Webhook
Retrieves webhook subscription(s) for the merchant.
Swagger
swagger: '2.0'
info:
x-ibm-name: Webhook
title: Webhook
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://<.........................>/fsc/oauth2/authorize'
scopes:
Fulfillment_Returns: ''
tokenUrl: 'https://<.........................>/fsc/oauth2/token'
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: []
Client_Id: []
oauth2:
- Fulfillment_Returns
x-ibm-configuration:
testable: true
enforced: true
phase: realized
paths:
/services/webhook/:
get:
responses:
200:
description: 200 OK
parameters:
- name: AccessToken
type: string
required: false
in: header
description: Enter the AccessToken, it is mandatory
- name: query_params
type: string
required: false
in: query
description: Enter all the query parameters
summary: GET Webhook
description: Retrieves webhook subscription(s) for the merchant.
Sample Request
• Retrieve individual webhook objects based on webhookId.
http://<........>/services/webhook?webhookId=1111,1112,1113
• Retrieve individual webhook objects based on status and eventName.
http://<........>/services/webhook?status=Active&eventName=Order_Shipped, Order_PartiallyShipped
• Retrieve Webhook list by status and pageLimit
http://<........>/services/webhook?status=Active&pageLimit=25
Sample Response
Success Response
{
"webhooks": [
{
"webhookId": "1111",
"status": "Active",
"eventName":"Order_Shipped",
"url": "https://yourcompany.com/webhook/callbackURL",
"secret":"top_secret"
},
{
"webhookId": "1112",
"status": "Active",
"eventName":"Order_PartiallyShipped",
"url": "https://yourcompany.com/webhook/callbackURL",
"secret":"top_secret"
}
],
"paging": {
"previous": "",
"next": ""
}
}
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 |
|---|---|---|---|---|
| webhookId | String | The webhook subscription ID. | Y | N |
| eventName | String | The event for which the developer subscribes to the webhook callback. Valid Values: Order_Shipped, Order_PartiallyShipped. |
Y | N |
| eventName | String | Indicates the status of a webhook. Valid values: Active, Inactive. |
Y | N |
| pageLimit | Number | The number of records to be retrieved in each page. Valid Values: 1 to 100. Default is 50. | N | N |
| offset | Number | Offset value to be passed to retrieve the previous/next page. Not applicable for initial request. | N | N |
Response Attribute
| Parameter | Data Type | Description |
|---|---|---|
| requestIdentifier | String | Request identifier |
| transactionDate | String | Transaction date/time |
| status | String | Status of the transaction. Valid Values: success, error. |
| webhooks[] | ||
| webhookId | String | The webhook subscription ID for the event. |
| status | String | Indicates if the webhook is active. Valid values: Active, Inactive. |
| eventName[] | String | The event(s) for which the developer subscribed to the webhook callback. |
| url | String | The callback URL. |
| secret | String | Secret key. |
| 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. |
| ERR-WHK-0001 | Event Name missing |
| ERR-WHK-0002 | Invalid Event Name |
| ERR-WHK-0003 | Callback URL missing |
| ERR-WHK-0004 | Invalid Webhook ID |
| ERR-WHK-0005 | Invalid status |
| ERR_WHK-0006 | Webhook <webhookId> is already active |
| ERR-WHK-0007 | Webhook <webhookId> is already inactive |
| ERR-WHK-0008 | Webhook <webhookId> is not active. |
| ERR-WHK-0009 | Webhook already exists for the event. |
