Skip to main content

Get Payment Term by ID

This API endpoint retrieves the details of a specific payment term based on the provided ID.

HTTP Request

  • URL: /api/paymentTerms/{id}
  • Method: GET
  • Headers:
    • accessToken: Required. This is your access token for authenticating the request.

Path Parameters

ParameterTypeDescription
idStringThe unique identifier of the payment term to retrieve.

cURL Example

Below is a sample cURL command that demonstrates how to make a request to the API endpoint:

curl --location '/api/paymentTerms/67a1eeba9269290064a159a4' \
--header 'accessToken: <ACCESS_TOKEN>'

Response

  • 200 OK: The request was successful, and the server returned the details of the specified payment term.
  • 4XX: Client errors indicating issues such as an invalid access token or ID not found.
  • 5XX: Server errors indicating that something went wrong on the server's end.

Sample JSON Response

Below is an example of the JSON response you might receive from making a request to this endpoint:

{
"success": true,
"data": {
"name": "Net 90",
"status": true,
"dueType": "net",
"paymentDueDays": 90,
"createdAt": "2025-02-04T10:40:58.825Z",
"updatedAt": "2025-02-04T10:40:58.825Z",
"id": "67a1eeba9269290064a159a4"
}
}

Response Details

KeyTypeDescription
successBooleanIndicates if the request was successful.
dataObjectContains the details of the requested payment term.

Payment Term Data

FieldTypeDescription
nameStringThe name of the payment term.
statusBooleanThe current status of the payment term, indicating if it's active.
dueTypeStringSpecifies the condition upon which the payment is due (e.g., "net").
paymentDueDaysIntegerNumber of days after the dueType upon which the payment is due.
createdAtStringTimestamp of when the payment term was created (in ISO 8601 format).
updatedAtStringTimestamp of when the payment term was last updated (in ISO 8601 format).
idStringThe unique identifier of the payment term.

Notes

  • Ensure that the accessToken provided is valid and has not expired.
  • Replace {id} in the URL with the actual ID of the payment term you want to retrieve.