Dispute Reasons¶
Retrieving a Reason¶
This endpoint can be used to return a single reason by its external code.
Swagger Page¶
Permission¶
Dispute Configuration : READ
Example Request¶
curl -X GET 'https://arc-aegis.billtrust.com/dispute/v1/tenants/{tenantId}/reasons/by-category-code/{categoryCode}/by-reason-code/{reasonCode}' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'X-Billtrust-Api-Key: <API key value>'
Example Response¶
{
"reasonId": "{reasonId}",
"tenantId": "{tenantId}",
"code": "DAMAGED",
"description": "Damaged in Shipping",
"active": true,
"categoryId": "{categoryId}",
"visibility": "Internal",
"createUser": "{userId}",
"createDate": "2021-03-28T15:30:21.242Z",
"updateUser": "{userId}",
"updateDate": "2021-03-28T15:30:21.242Z"
}
Retrieving a List of Reasons¶
There are two endpoints that can be used to return a list of reasons. The first endpoint uses a tenant's internal identifier to return all of the reasons under that tenant. The second endpoint uses a tenant's internal identifier and a category's external code to return all of the reasons under that tenant and category.
Swagger Page¶
For fetching reasons under a desired tenant:
For fetching reasons under a desired tenant and category:
Permission¶
Dispute Configuration : READ
Example Request¶
For fetching reasons under a desired tenant:
curl -X GET 'https://arc-aegis.billtrust.com/dispute/v1/tenants/{tenantId}/reasons' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'X-Billtrust-Api-Key: <API key value>'
For fetching reasons under a desired tenant and category:
curl -X GET 'https://arc-aegis.billtrust.com/dispute/v1/tenants/{tenantId}/categories/by-code/{categoryCode}/reasons' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'X-Billtrust-Api-Key: <API key value>'
Example Response¶
For both endpoints, the response will be as follows:
[
{
"reasonId": "{reasonId}",
"tenantId": "{tenantId}",
"code": "DAMAGED",
"description": "Damaged in Shipping",
"active": true,
"categoryId": "{categoryId}",
"visibility": "Internal",
"createUser": "{userId}",
"createDate": "2021-03-28T15:30:21.242Z",
"updateUser": "{userId}",
"updateDate": "2021-03-28T15:30:21.242Z"
},
...
]
Creating a Reason¶
Swagger Page¶
Permission¶
Dispute Configuration : CREATE
Example Request¶
In the request body, a category's internal identifier (categoryId) and/or a category's external code (categoryCode) must be specified in order to create a reason. Category code is optional, only needed when category ID is not known by the API's user. Regarding visibility field, many customers want to have different sets of reason codes for internal and external use - when someone at the supplier creates a dispute, they can set the internal reason code, but when someone at the buyer creates a dispute through a buyer portal such as EIC, they should see a different set of codes. These external codes would need to map back to some internal code.
curl -X POST 'https://arc-aegis.billtrust.com/dispute/v1/tenants/{tenantId}/reasons' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'X-Billtrust-Api-Key: <API key value>' \
-d '{ "code": "DAMAGED", "description": "Damaged in Shipping", "active": true, "categoryId": "{categoryId}","visibility":"Internal", "categoryCode": "{category code}"}'
Example Response¶
{
"reasonId": "{reasonId}",
"tenantId": "{tenantId}",
"code": "DAMAGED",
"description": "Damaged in Shipping",
"active": true,
"categoryId": "{categoryId}",
"visibility": "Internal",
"createUser": "{userId}",
"createDate": "2021-03-28T15:30:21.242Z",
"updateUser": "{userId}",
"updateDate": "2021-03-28T15:30:21.242Z"
}
Updating a Reason¶
Swagger Page¶
Permission¶
Dispute Configuration : UPDATE
Example Request¶
In the request body, a category's internal identifier (categoryId) and/or a category's external code (categoryCode) must be specified in order to update a reason. Category code is optional, only needed when category ID is not known by the API's user. Regarding visibility field, many customers want to have different sets of reason codes for internal and external use - when someone at the supplier updates a dispute, they can set the internal reason code, but when someone at the buyer updates a dispute through a buyer portal such as EIC, they should see a different set of codes. These external codes would need to map back to some internal code.
curl -X PUT 'https://arc-aegis.billtrust.com/dispute/v1/tenants/{tenantId}/reasons/{reasonId}' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'X-Billtrust-Api-Key: <API key value>' \
-d '{ "description": "Damaged during Shipping", "active": true, "categoryId": "{categoryId}", "categoryCode":"category-code", "visibility":"Internal" }'
Example Response¶
{
"reasonId": "{reasonId}",
"tenantId": "{tenantId}",
"code": "DAMAGED",
"description": "Damaged during Shipping",
"active": true,
"categoryId": "{categoryId}",
"visibility": "Internal",
"createUser": "{userId}",
"createDate": "2021-03-28T15:30:21.242Z",
"updateUser": "{userId}",
"updateDate": "2021-03-30T12:12:00.000Z"
}
Deleting a Reason¶
Swagger Page¶
Permission¶
Dispute Configuration : DELETE
Example Request¶
curl -X DELETE 'https://arc-aegis.billtrust.com/dispute/v1/tenants/{tenantId}/categories/by-code/{categoryCode}/reasons/by-code/{reasonCode}' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'X-Billtrust-Api-Key: <API key value>'