Check if brief name is unique

POST/brief-name-unique-check

Check if brief name is unique. Here we have excludedId parameter. It represents biz_core.biz_partner.id. The Api will search all ids except excludedID, if excludedID <> 0 it will skip this value. The default value is 0, which means that all IDs will be serached. CompareDate is a parameter when we have date for compare. If the date of briefName before compareDate we will not check this briefName. Default date is "2007-01-01".

Privileges: none

Audit event: biz.partners.put

Validation errors:

  • BIZ_CORE:BRIEF_NAME_MUST_BE_PROVIDED - Brief name must be provided.
  • BIZ_CORE:BRIEF_NAME_CANNOT_BE_LONGER_THAN_50_CHARACTERS - Brief name cannot be longer than 50 characters.
  • BIZ_CORE:PARTNER_COMPARE_DATE_IS_NOT_VALID - Compare date is not valid.
Base URL
https://api-cpaas.sms.es/biz-core/v2
Authentication

OAuth2 — send Authorization: Bearer <access_token>. Token URL: https://accounts-cpaas.sms.es/oauth2/access-token

Request

Body required

application/json
briefNamestringrequired
compareDatestring
excludedIdinteger

Request example

cURL · cURL
curl -L -X POST "https://api-cpaas.sms.es/biz-core/v2/brief-name-unique-check" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <access_token>" \
  --data-raw '{
  "briefName": "string",
  "compareDate": "string",
  "excludedId": 0
}'

Responses

Brief name is unique

application/json
briefNamestringrequired
excludedIdinteger
uniquebooleanrequired
Example response
{
  "briefName": "string",
  "excludedId": 0,
  "unique": true
}