Introduction
The Account Number Subscription API is designed for the webhook subscribers to manage their account number based webhook projects and perform project related operations such as edit or view details using API endpoints.
Note:
- You must have admin access for your API project where this API is enabled.
- For more information on webhook and its features, visit the Shipment Visibility Webhook documentation page.
Benefits of Account Number Subscription API
The benefits of Account Number Subscription API are:
- You can easily update and manage your webhook project using the API endpoints.
- This API enables you to associate multiple accounts to your project in a single API transaction, instead of selecting each account one by one.
How Account Number Subscription API works
Use the below endpoints to manage your webhook project:
Retrieve Summary
Use this endpoint to retrieve all webhook project details under your organization in a paginated format.
The required input information for this request is:
- pageNumber: Specify the number of pages to get in the response.
- resultsPerPage: Specify the number of entries to be displayed in a single page.
- Status: Specify the status of the subscriptions to be retrieved in the response. Ex: ACTIVE, PAUSED, IN-PROGRESS, PROCESING, FAILED, CANCELED.
The successful response to this request will generate the webhook project list in a paginated format as per the parameters set in the request.
Search Webhooks Project
Use this endpoint to search specific webhook project details under your organization in paginated format.
The required input information for this request is:
- authorization: Specify the encrypted OAuth token used to authenticate your API requests. Use it in the authorization header of your API requests.
- searchText: Specify the string that needs to be searched to retrieve the webhook subscriptions.
- status: Specify the status of the webhook project to be retrieved in the response. Use this option to filter the webhook project based on their status. Ex: ACTIVE, PAUSED, IN-PROGRESS, PROCESSING, FAILED, CANCELED.
The successful response to this request will generate all the webhook project list in a paginated format as per the parameters set in the request.
Update Webhooks Project
Use this endpoint to update any webhook project details under your organization.
The input information for this request is:
- requestType: Specify the type of update request.
- ADD_ACCOUNTS: Use this option to add new accounts in the existing project if the organization is already associated with webhook project for all accounts.
- DELETE_ACCOUNTS: Use this option to delete any account from the project.
- UPDATE_ALL: Use this option for regular project updates.
Note: This is an optional element and UPDATE_ALL is selected by default, if not specified by the user. - category: Specify the category of the feature you want to update for the project. Example: RETRY_POLICY, PROOF_OF_DELIVERY etc.
- subCategories: Specify the individual features for the selected feature category. Example: BASIC_HRS, PPOD, SPOD, SHIP, TRAN etc.
The successful response to this request will return the subscription Id, an indicator if the project has been updated for all the accounts in the organization, and a timestamp for the updated project.
Retrieve Project Detail
Use this endpoint to retrieve the project details for a specified webhook project in a paginated format.
The required input information for this request is:
- authorization: Specify the authorization token.
- subscriptionId: Specify the subscription Id for the webhook project to retrieve the details.
The successful response to this request will generate the specified webhooks project details in a paginated format or will return an alert or error details in case of any failures.
Business Rules
- A maximum of 30,000 shipping account numbers can be associated with a webhook project in a given request.
Response