Skip to main content

Delete Multiple CPNs

Permanently deletes several customer part numbers (CPNs) in one request. This action cannot be undone.

HTTP Request​

  • URL: /cpn/multiple
  • Method: DELETE
  • Headers:
    • accessToken: Required. Your API access token.
    • Content-Type: application/json
  • Required scope: READ_CUSTOMERPARTNUMBER or READ_WRITE_CUSTOMERPARTNUMBER

Request Body​

The request body is a JSON object with the following field:

FieldTypeRequiredDescription
cpnIdsArrayYesIDs of the CPNs to delete.

cURL Example​

curl --location --request DELETE '<BASE_URL>/cpn/multiple' \
--header 'accessToken: <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"cpnIds": [
"69021dec6f3d8d4a6ebf8dba",
"69021dec6f3d8d4a6ebf8dbb",
"69021dec6f3d8d4a6ebf8dbc"
]
}'

Response​

  • 200 OK: The CPNs were deleted successfully.
  • 400 Bad Request: The access token is missing or invalid, the token does not have the required scope, cpnIds is missing or empty, an ID is not valid, or a CPN belongs to a locked company.
  • 404 Not Found: None of the IDs match a CPN.

Sample JSON Response​

{
"success": true,
"message": "Deleted 3 CPN records successfully"
}

Response Details​

FieldTypeDescription
successBooleanWhether the CPNs were deleted.
messageStringNumber of CPNs deleted.

Notes​

  • IDs that do not match a CPN are skipped.
  • If any of the CPNs belongs to a locked company, none are deleted.