▪ Add Competitor
Add Competitor API allows the user to add a competitor to a resource that is already associated to a licence.
Warning
Once a competitor is added, its deletion will be allowed only after 6 months.
Request
Endpoint
POST
/v4/account/{account_id}/{resource_type}/{resource_id}/competitors
Path Parameters
Name | Description | Type | Examples |
---|---|---|---|
*{account_id} | Provided identifier of the account. | string | |
*{resource_type} | Identifier of the type of the resource to associate the competitor to. | string | poi |
*{resource_id} | Identifier of the resource to associate the competitor to. Value obtainable from $.results[*].resource.id field of List Licences Response Body. |
string | XXeUNbmtYZTsH7UGvNfXWo |
Supported values for {resource_type}
- poi
Header Parameters
Name | Description | Type | Examples |
---|---|---|---|
*x-api-key | Provided API key {x_api_key} that allows authentication. |
string | |
*Authorization | Provided token {jwt_bearer} that allows authorization. |
string | Bearer {jwt_bearer} |
Body
AssociableResource
Field | Description | Type | Examples |
---|---|---|---|
*resource_type | Identifier of the type of the resource to be associated. | string | poi |
*id | Identifier of the resource to be associated Value obtainable from $.results.pois[*].id field of any Search API Response Body. |
int | EujqFHQra7ypyuBEgyFiXw |
Supported values for {resource_type}
- poi
Example
curl -X PUT 'https://api.datappeal.io/v4/licence/account/{account_id}/poi/HF8xjSQW4W43NGr56denSh/competitors' \
-H 'x-api-key: {x_api_key}' \
-H 'Authorization: Bearer {jwt_bearer}' \
-H 'Content-Type: application/json' \
-d '{
"resource_type": "poi",
"id": "UiCazu2MtzMGeXagvnxXi6"
}'
Response
Status
Status | Description |
---|---|
200 | Competitor has been successfully added to the resource. |
403 | Competitors limit exceeded. |