Creates account receivables for automated collection

​

Creates new account receivables that are automatically managed by the Treasury system. These represent amounts owed to the customer by their debtors. The system will track and manage the collection process according to predefined organizational rules. If purge_before_load is true in the header options, existing account receivables will be purged before creating new ones.

Body

application/json

Account receivables message that instructs the Treasury system to create and manage account receivables for automated collection. These represent amounts owed to the customer by their debtors. The system will track and manage the collection process according to predefined organizational rules. If purge_before_load is true in the header options, existing account receivables will be purged before creating new ones.

  • Envelops the message content

    Properties: 2

Responses

  • application/json
  • application/json
  • Forbidden (e.g: wrong API Key)

  • application/json
  • application/json
Request Example for post/account_receivables
curl https://api.treasury.shinkansen.finance/v1/account_receivables \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Shinkansen-Treasury-Api-Key: YOUR_SECRET_TOKEN' \
  --header 'Shinkansen-JWS-Signature: YOUR_SECRET_TOKEN' \
  --data '{
  "document": {
    "header": {
      "message_id": "550e8400-e29b-41d4-a716-446655440000",
      "creation_date": "2024-01-01T00:00:00Z",
      "sender": {
        "fin_id_schema": "SHINKANSEN",
        "fin_id": "MONSTER_INC_CL"
      },
      "receiver": {
        "fin_id_schema": "SHINKANSEN",
        "fin_id": "SHINKANSEN_TREASURY"
      },
      "options": {
        "purge_before_load": false
      }
    },
    "account_receivables": [
      {
        "payee_id": "12345678",
        "payee_id_schema": "CLID",
        "payee_name": "Test Payee",
        "amount": "1000.00",
        "currency": "CLP",
        "description": "Test account receivable",
        "lowerbound_due_date": "2024-12-31",
        "upperbound_due_date": "2025-01-31",
        "tags": [
          "urgent",
          "priority"
        ],
        "custom_fields": {
          "invoice_number": "INV-001",
          "department": "sales"
        }
      }
    ]
  }
}'
{
  "account_receivables": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440001",
      "external_id": "AR-001",
      "payee_id": "12345678",
      "payee_id_schema": "CLID",
      "payee_name": "Test Payee",
      "amount": "1000.00",
      "currency": "CLP",
      "description": "Test account receivable",
      "lowerbound_due_date": "2024-12-31",
      "upperbound_due_date": "2025-01-31",
      "state": "pending",
      "tags": [
        "urgent",
        "priority"
      ],
      "custom_fields": {
        "invoice_number": "INV-001",
        "department": "sales"
      },
      "created_at": "2024-01-01T00:00:00Z",
      "updated_at": "2024-01-01T00:00:00Z"
    }
  ]
}