Error: Recorderror purchase_ledger_account is invalid

Hey Guys,

I want to add a customer via the API like I did several times before in the past - but it doesn't work anymore although I haven't changes anything in my requests an payloads.

The Error is:

`422 - [{"$severity":"error","$dataCode":"RecordInvalid","$message":"is invalid","$source":"purchase_ledger_account"}]`

The URL is: `POST api.accounting.sage.com/.../contacts`

The payload is:

```

{
  contact: {
    name: 'string',
    reference: 'string',
    tax_number: 'string',
    aux_reference_vendor: 'string',
    aux_reference_customer: 'string',
    default_purchase_ledger_account_id: '126871e4861c11e9bcfe0268dc652fba',
    default_sales_tax_rate_id: 'DE_ZERO',
    email: 'string',
    main_address: [Object],
    main_contact_person: [Object],
    bank_account_details: [Object],
    tax_treatment: [Object],
    contact_type_ids: [Array],
    aux_reference: 'string',
  }
}

```

I don't even have a purchase_ledger_account attribute in the payload - and if the error means that the `default_purchase_ledger_account_id` invalid, here is the response to the call to  `api.accounting.sage.com/.../126871e4861c11e9bcfe0268dc652fba`

```

{
"id": "126871e4861c11e9bcfe0268dc652fba",
"displayed_as": "Sonstige Leistungen eines im anderen EU-Land ansässigen Unternehmers 19 % Vorsteuer und 19 % Umsatzsteuer (3123)",
"$path": "/ledger_accounts/126871e4861c11e9bcfe0268dc652fba",
"created_at": "2019-06-03T16:24:33Z",
"updated_at": "2019-06-03T16:24:33Z",
"ledger_account_group": {
"id": "EXPENSE",
"displayed_as": "Ausgabe"
},
"name": "Sonstige Leistungen eines im anderen EU-Land ansässigen Unternehmers 19 % Vorsteuer und 19 % Umsatzsteuer",
"display_name": "Sonstige Leistungen eines im anderen EU-Land ansässigen Unternehmers 19 % Vorsteuer und 19 % Umsatzsteuer",
"visible_scopes": [
"journals",
"purchasing_eu",
"reporting"
],
"included_in_chart": true,
"nominal_code": 3123,
"ledger_account_type": {
"id": "DIRECT_EXPENSES",
"displayed_as": "Einzelkosten",
"$path": "/ledger_account_types/DIRECT_EXPENSES"
},
"ledger_account_classification": {
"id": "DE_RECEIVING_INVENTORY",
"displayed_as": "3 - Wareneingangs- und Bestandskonten",
"$path": "/ledger_account_classifications/DE_RECEIVING_INVENTORY"
},
"tax_rate": {
"id": "DE_STANDARD",
"displayed_as": "19,00% USt",
"$path": "/tax_rates/DE_STANDARD"
},
"fixed_tax_rate": true,
"visible_in_banking": false,
"visible_in_expenses": false,
"visible_in_journals": true,
"visible_in_other_payments": false,
"visible_in_other_receipts": false,
"visible_in_reporting": true,
"visible_in_sales": false,
"is_control_account": false,
"control_name": null,
"display_formatted": "3123 - Sonstige Leistungen eines im anderen EU-Land ansässigen Unternehmers 19 % Vorsteuer und 19 % Umsatzsteuer",
"tax_recoverable": null,
"recoverable_percentage": null,
"non_recoverable_ledger_account": null
}

```

I also tried several other ledger account ids with no succes.

Parents Reply Children
No Data