Create or update a spending account

Request

If an object with the same ID already exists, it will be overwritten.

Security
OAuth2(Required scopes: FullAccessSpendingAccountAdmin)
Path
buyerIDstringrequired

ID of the buyer.

spendingAccountIDstringrequired

ID of the spending account.

Bodyapplication/jsonrequired
Namestring, <= 100 charactersrequired
Example:""
Balancenumber, (float)required
Example:0
IDstring, <= 100 characters
Example:""
AllowAsPaymentMethodboolean

If true, a payment can be created referencing the SpendingAccountID.

Example:false
StartDatestring, (date-time)
Example:"2018-01-01T00:00:00-06:00"
EndDatestring, (date-time)
Example:"2018-01-01T00:00:00-06:00"
xpobject
Example:
{}
curl -i -X PUT \
  'https://api.ordercloud.io/v1/buyers/{buyerID}/spendingaccounts/{spendingAccountID}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "ID": "",
    "Name": "",
    "Balance": 0,
    "AllowAsPaymentMethod": false,
    "StartDate": "2018-01-01T00:00:00-06:00",
    "EndDate": "2018-01-01T00:00:00-06:00",
    "xp": {}
  }'

Responses

If an object with the same ID already exists, it will be overwritten.

Bodyapplication/json
IDstring, <= 100 characters
Example:""
Namestring, <= 100 characters
Example:""
Balancenumber, (float)
Example:0
AllowAsPaymentMethodboolean

If true, a payment can be created referencing the SpendingAccountID.

Example:false
StartDatestring, (date-time)
Example:"2018-01-01T00:00:00-06:00"
EndDatestring, (date-time)
Example:"2018-01-01T00:00:00-06:00"
xpobject
Example:
{}
Response
{ "ID": "", "Name": "", "Balance": 0, "AllowAsPaymentMethod": false, "StartDate": "2018-01-01T00:00:00-06:00", "EndDate": "2018-01-01T00:00:00-06:00", "xp": {} }