Share

Get details of a subscription

GET /api/v1/erp/subscriptions/{id} returns information about the subscription identified in the {id} parameter.

Request schema

Method URL
GET /api/v1/erp/subscriptions/{id}

Request header

*indicates required fields

Field Value type Description of values
*Authorization String Enter: Bearer access token.
*id Integer The ID of the subscription for which you'd like to view details.
*Upc-Selected-Company Integer Company’s ID. Use the value returned in the id field received in response to the following request: GET /api/auth/v1/companies.
X-User-Id Text Enter the email address of the user being impersonated. This value is required if you are using a two-legged token. If you are using a three-legged token, then this field is not required.

Sample request

{
"id": 1
"upc-Selected-Company": 68
}

Response schema

Response payload

Field Value type Description of values
description String Your descriptive label for the subscription.
divisions String/Array Divisions subscribing to the notifications.
supportedOperations Array List of workflow operations to which notifications are subscribed.
supportedOperations.operationId Integer Accepted values are 1, 2, and 3. Each number represents an operation:

  • 1 - Check connection to ERP
  • 2 - Validate work order data in ERP
  • 3 - Create a requisition in the ERP system
supportedOperations.path String Path to location where the specified operation’s updates are posted. The required parameters are based on the value of operationId.
  • operationId = 1 only requires the name of the divisions for which this operation is to be performed. Use a comma if listing multiple divisions.
  • operationId = 2 has the following, optional, query parameters:
    • Location to which the updates for the specified operation should be sent,
    • Project number,
    • Legacy assembly number, and
    • Name of divisions subscribing to the notification. Use a comma between divisions.
  • operationId = 3 does not require the URL or any additional parameters.
apiRoot String URL for ERP system or adapter.
oauth2ClientCredentials Array OAuth credentials.
oauth2ClientCredentials.clientId String OAuth client ID.
oauth2ClientCredentials.clientSecret String OAuth client secret.
oauth2ClientCredentials.tokenURL String OAuth access token.
oauth2ClientCredentials.scope String Accepted values are:

  • read only
  • write only
  • read write
id String Subscription's id.
companyId String Company id.

Sample response

{
"description": "test subscription",
"divisions": [
    "Cambridge EC",
    "Cambridge APG",
    "Cambridge LS"
],
"supportedOperations": [
    {
    "operationId": 3,
    "path": "/CreateRequisitionsAsyncJSON"
    },
    {
    "operationId": 2,
    "path": "/ValidateJDEWorkOrderBoolByDivision?engineeringProjectNumber={engineeringProjectNumber}&divisionName={divisionName}&assemblyLegacyNumber={assemblyLegacyNumber}"
    },
    {
    "operationId": 1,
"   path": "/IsAliveByDivision?divisionName={divisionName}"
    }
],
"apiRoot": "https://webhook.site/3bb2bf74-131f-431d-8552-f502962573ff",
"oauth2ClientCredentials": {
    "clientId": "87654321abcdefgh",
    "clientSecret": "abcdefgh87654321",
    "tokenUrl": "https://my-token-url",
    "scope": "read write"
    },
"id": 6,
"companyId": 1
}

Was this information helpful?