POST v1/accounts

Create a new Api Account. Each account must have a unique ForeignAccountKey, otherwise a failure result with a 409 error code is returned.

Request Information

URI Parameters

None.

Body Parameters

The details of the new account including the mandatory ForeignAccountKey

Account
NameDescriptionTypeAdditional information
ForeignAccountKey

The unique account identifier

string

Required

Matching regular expression pattern: ^[A-z0-9\s-\.]*$

Max length: 24

TenantId

string

None.

Description

Gets and sets an optional description for the Account

string

None.

EmailContact

Gets and sets the email contact address of the Account. This may be optional depending on the integration.

string

None.

StartDate

Gets the date the Account was created on.

date

None.

ForeignAttributes

Gets and sets optional attributes that can be stored with the Account

Dictionary of string [key] and string [value]

None.

ProvisioningMetaData

Gets and sets optional provisioning data that may be required to be suppled on Account creation. This will depend on the integration

Dictionary of string [key] and string [value]

None.

Version

integer

None.

ActorStatus

ActorStatusValues

None.

Request Formats

application/json, text/json

Sample:
{
  "ForeignAccountKey": "sample string 1",
  "TenantId": "sample string 2",
  "Description": "sample string 3",
  "EmailContact": "sample string 4",
  "StartDate": "2018-12-14T07:37:04.0256977+00:00",
  "ForeignAttributes": {
    "sample string 1": "sample string 2",
    "sample string 3": "sample string 4"
  },
  "ProvisioningMetaData": {
    "sample string 1": "sample string 2",
    "sample string 3": "sample string 4"
  },
  "Version": 6,
  "ActorStatus": 0
}

application/xml, text/xml

Sample:
<Account xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AS.Models.API">
  <ActorStatus>stable</ActorStatus>
  <Description>sample string 3</Description>
  <EmailContact>sample string 4</EmailContact>
  <ForeignAccountKey>sample string 1</ForeignAccountKey>
  <ForeignAttributes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 1</d2p1:Key>
      <d2p1:Value>sample string 2</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 3</d2p1:Key>
      <d2p1:Value>sample string 4</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </ForeignAttributes>
  <ProvisioningMetaData xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 1</d2p1:Key>
      <d2p1:Value>sample string 2</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 3</d2p1:Key>
      <d2p1:Value>sample string 4</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </ProvisioningMetaData>
  <StartDate>2018-12-14T07:37:04.0256977+00:00</StartDate>
  <TenantId>sample string 2</TenantId>
  <Version>6</Version>
</Account>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'Account'.

Response Information

Resource Description

The newly created Account

PBPRReturnOfAccount
NameDescriptionTypeAdditional information
Data

Account

None.

Success

Gets the success status of the API call

boolean

None.

Meta

Gets the optional meta-data

Dictionary of string [key] and string [value]

None.

Code

Get the http code of the API call e.g. 200, 202, 409

integer

None.

ErrorCode

Get the failure error code of the API call. This is available if Success is false

integer

None.

ErrorSubCode

Gets the error sub code if available

integer

None.

ErrorDescription

Gets a textual description of the error

string

None.

StatusUrl

Gets the status url for any ACCEPTed API commands. Any command (POST,DELETE,PATCh,PUT) to the API usually returns a 202 response code. The status of the command can be queried using the URL provided

string

None.

ContinuationToken

Gets the token to be used for paged queries

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Success": true,
  "Meta": {
    "sample string 1": "sample string 2",
    "sample string 3": "sample string 4"
  },
  "Code": 2,
  "ErrorCode": 3,
  "Data": {
    "ForeignAccountKey": "sample string 1",
    "TenantId": "sample string 2",
    "Description": "sample string 3",
    "EmailContact": "sample string 4",
    "StartDate": "2018-12-14T07:37:04.0256977+00:00",
    "ForeignAttributes": {
      "sample string 1": "sample string 2",
      "sample string 3": "sample string 4"
    },
    "ProvisioningMetaData": {
      "sample string 1": "sample string 2",
      "sample string 3": "sample string 4"
    },
    "Version": 6,
    "ActorStatus": 0
  },
  "ErrorSubCode": 4,
  "ErrorDescription": "sample string 5",
  "StatusUrl": "sample string 6",
  "ContinuationToken": "0ceWi8PS%2F4Oom8XNzIaQog%3D%3D"
}

application/xml, text/xml

Sample:
<PBPRReturnOfAccount7NMnQmOk xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AS.Models.API">
  <Code>2</Code>
  <ContinuationToken>0ceWi8PS%2F4Oom8XNzIaQog%3D%3D</ContinuationToken>
  <ErrorCode>3</ErrorCode>
  <ErrorDescription>sample string 5</ErrorDescription>
  <ErrorSubCode>4</ErrorSubCode>
  <Meta xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 1</d2p1:Key>
      <d2p1:Value>sample string 2</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 3</d2p1:Key>
      <d2p1:Value>sample string 4</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </Meta>
  <StatusUrl>sample string 6</StatusUrl>
  <Success>true</Success>
  <Data>
    <ActorStatus>stable</ActorStatus>
    <Description>sample string 3</Description>
    <EmailContact>sample string 4</EmailContact>
    <ForeignAccountKey>sample string 1</ForeignAccountKey>
    <ForeignAttributes xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>sample string 1</d3p1:Key>
        <d3p1:Value>sample string 2</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>sample string 3</d3p1:Key>
        <d3p1:Value>sample string 4</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </ForeignAttributes>
    <ProvisioningMetaData xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>sample string 1</d3p1:Key>
        <d3p1:Value>sample string 2</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>sample string 3</d3p1:Key>
        <d3p1:Value>sample string 4</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </ProvisioningMetaData>
    <StartDate>2018-12-14T07:37:04.0256977+00:00</StartDate>
    <TenantId>sample string 2</TenantId>
    <Version>6</Version>
  </Data>
</PBPRReturnOfAccount7NMnQmOk>