Skip to main content

Fetch active currency sale for user

Definition

This API endpoint allows you to fetch the active currency sale for a given user in real time.

Request

GET https://api.inbrain.ai/panelist-api/v1/{userId}/active-currency-sale

Headers

HeaderDescriptionRequired
X-InBrain-Api-KeyAuthentication API Keytrue

Parameters

Endpoint accepts a user id route parameter and client id query string parameter on the request link.

Root parameters

ParameterDescriptionRequired
userIdUnique user identifiertrue
clientIdIntegration client idtrue

Examples

curl \
--request GET 'https://api.inbrain.ai/panelist-api/v1/{userId}/active-currency-sale?clientId=INTEGRATION_CLIENT_ID_HERE' \
--header 'X-InBrain-Api-Key: YOUR_API_KEY_HERE'

Response

Response codes

CodeDescriptionReason
200Success
400Bad RequestSome of the request parameters are missing or invalid
401UnauthorizedInvalid API Key
404NotFoundUser not found
429Too Many RequestsToo many requests in a given amount of time
500Internal Server ErrorServer error occured while processing the request

Success model

Successful response is a JSON object with the properties given below.

PropertyTypeDescriptionRequired
externalIdstringExternal id of the saletrue
endOndateEnd date of the saletrue
multiplierdecimalSale multipliertrue
descriptionstringDescription of the salefalse
lockedUntildateDate until the currency sale is locked read morefalse

Error model

Error response is a JSON object with the properties given below.

PropertyTypeDescriptionRequired
codestringAPI error codetrue
descriptionstringAPI error descriptiontrue
messagesstring[]Error messages providing further error detailsfalse

Examples

{
"externalId": "test",
"endOn": "2023-09-25T09:15:20.8835755Z",
"multiplier": 3.00,
"description": "Test Sale",
"lockedUntil": "2023-08-09T12:10:20.8835755"
}