Skip to content

Add Cost Account

Request

This operation creates cost account.

Key Considerations:

  • A cost account is an account used to maintain and segregate records for shipments, postage, and other operational data. There can be multiple Cost accounts, I.e; multiple Wallet - but one ledger.
  • Cost accounts allow to track which wallet was used for payment, maintain detailed payment history, and set budget notifications or thresholds.
  • Cost accounts are managed in a hierarchical structure: Enterprise > Division > Location.
  • Cost accounts can be assigned to a location, enabling client administrators to filter and analyze records based on the selected cost account.
  • A location can have one or more cost accounts assigned to it. This allows to filter shipments or postage records by selecting the cost account.
  • Cost accounts are assigned a status of either Active or Inactive.
  • Sub-Cost Accounts and Sub-Sub-Cost Accounts can also be created under the main cost account to further refine segregation.
Security
bearerAuth
Headers
X-PB-Developer-Partner-IDstring

This is the Developer Partner ID. When the developer is the only partner, this field is not required.

Bodyapplication/jsonrequired
namestringrequired

Name of the cost account. When used in Shipment APIs, this field is referred to as costAccountName.

Example:"testname"
codestringrequired

Code of the cost account. When used in Shipment APIs, this field is referred to as costAccountCode.

Example:"test01"
passwordEnabledboolean

Set to true when to enable password on cost account

Example:true
passwordCodestring

Only required when passwordEnabled is true. this indicates the password you want to set. It should be alphanumeric and lenght of 4

Example:"test"
descriptionstring

this indicates the description you want to provide for cost account

Example:"test cost account"
statusboolean

Setting true creates cost account as Active and setting false makes it inactive

Example:true
billableboolean

set to true in case want to make cost account billable

Example:true
parentstring

this indicates cost account Id of parent account

Example:""
advanceOptionobject

Additional configuration options for assigning the cost account to a specific hierarchy level (Enterprise, Division, or Location). If no permission is provided, the cost account is assigned to the Enterprise level by default.

Example:
{ "permission": { "permissionByEntity": "D", "permissionByValue": [ "div_auto_sac11be" ] } }
curl -i -X POST \
  https://api-sandbox.sendpro360.pitneybowes.com/costaccountmgmt/api/v1/costAccounts \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'X-PB-Developer-Partner-ID: string' \
  -d '{
    "name": "testname",
    "code": "test01",
    "passwordEnabled": true,
    "passwordCode": "test",
    "description": "test cost account",
    "status": true,
    "billable": true,
    "parent": "",
    "advanceOption": {
      "permission": {
        "permissionByEntity": "D",
        "permissionByValue": [
          "div_auto_sac11be"
        ]
      }
    }
  }'

Responses

Cost Account Added Successfully

Bodyapplication/json
accountIDstring

Unique cost account id generated by system. When used in Shipment APIs, this field is referred to as costAccountId.

Response
{ "accountID": "string" }