Skip to main content

Child Account - Create / Update

info

This endpoint is only for Incentify Accounts in a Parent/Child architecture.

Purpose​

To insert or update a Child Account which your API Credentials has access to.

Requires an internal_account_id to be input - if match is found, it updates that matching Account and if no match, a new Child Account will be created.

Account Architecture

Request​

Endpoint

POST /child-account

Authentication

Include your API Key within the x-api-key header as described here.

Request Body Parameters

NOTE: The internal_account_id in the request is used to apply "upsert" logic - ie; if a matching record is found it will perform an update and if not it will perform an insert.

The following table lists the parameters supported in the JSON POST payload.

Required Request Parameters
  1. Parameters below marked with * are required.
  2. Parameters below marked with ** are required (but will only be set upon creation).
ParameterTypeDefinition
internal_account_id **stringRequired only if your Incentify account is a parent/child account configuration. This is the unique ID of the account from your internal system. If an internal_account_id does not have a match (ie; does not match that of the Parent or any Child accounts), then a new Child Account will be created.
internal_account_title*stringName of the Account.
status *enumCan either be active or archived.

Request Body Example

{
"internal_account_id":"child_account_1899",
"internal_account_title":"Child Account 1899",
"status":"active"
}

Response​

If successful, this method returns a response body with the following structure:

Response Body

{
"code":200,
"success":true,
"data": {
Account Resource here (See "Account - Overview" page)
},
"errors": [],
"meta": {},
"links": {}
}

Properties

The following table defines the properties that appear in this resource:

KeyTypeDefinition
codeintegerHTTP Status Code (ie; 200, 403, etc).
successbooleanEither true (success) or false (fail).
dataobjectAccount updated is returned. The data structure of the Account is a Account Resource.
errorsobjectIf the request fails, this will contain information about the error.
metaobjectContains information about pagination and total record count.
linksobjectContains pre-built links for forward/backward pagination.