Jump to content

Recommended Posts

Posted

Hi,

 

Im getting the next error when trying to update Bills via API ( for Sage Business Cloud), any idea whats wrong?

"validation" : { "errors" : [ { "field" : "", "message" : "The request contained parameters that are restricted for Accounting in Canada [migrated,tax_analysis]" } ] }


I don't have any migrated or tax_analysis fields in the payload.

 

The payload is:
 

{
  “purchase_invoice”: {
    “railzRequestSourceId”: “37371b1c58094f188714e96bcf86f15d”,
    “id”: “37371b1c58094f188714e96bcf86f15d”,
    “due_date”: “2024-02-17”,
    “date”: “2023-02-17”,
    “exchange_rate”: “1”,
    “reference”: “bluetooth”,
    “invoice_lines”: [
      {
        “description”: “desc: front-end”,
        “unit_price”: 20,
        “quantity”: 5,
        “total_amount”: 100
      }
    ],
    “displayed_as”: “548680592686902”,
    “$path”: “/purchase_invoices/37371b1c58094f188714e96bcf86f15d”,
    “created_at”: “2023-04-18T09:09:53Z”,
    “updated_at”: “2023-04-18T09:09:53Z”,
    “links”: [
      {
        “href”: “https://accounting.na.sageone.com/invoicing/purchase_invoices/37371b1c58094f188714e96bcf86f15d”,
        “rel”: “alternate”,
        “type”: “text/html”
      }
    ],
    “editable”: true,
    “transaction”: {
      “id”: “874e0ebf4ba040a491bc9e89a13ccc72",
      “displayed_as”: “548680592686902",
      “$path”: “/transactions/874e0ebf4ba040a491bc9e89a13ccc72",
      “created_at”: “2023-04-18T09:09:53Z”,
      “updated_at”: “2023-04-18T09:09:53Z”,
      “date”: “2023-04-18",
      “deleted”: false,
      “reference”: “548680592686902”,
      “total”: “178.99”,
      “total_in_transaction_currency”: “178.99”,
      “contact”: {
        “id”: “5240dc26e0714437b797a9b083f32254",
        “displayed_as”: “Apple Inc (888888888)“,
        “$path”: “/contacts/5240dc26e0714437b797a9b083f32254"
      },
      “transaction_type”: {
        “id”: “PURCHASE_INVOICE”,
        “displayed_as”: “Vendor Bill”,
        “$path”: “/transaction_types/PURCHASE_INVOICE”
      },
      “origin”: {
        “id”: “37371b1c58094f188714e96bcf86f15d”,
        “displayed_as”: “548680592686902",
        “$path”: “/purchase_invoices/37371b1c58094f188714e96bcf86f15d”,
        “links”: [
          {
            “href”: “https://accounting.na.sageone.com/invoicing/purchase_invoices/37371b1c58094f188714e96bcf86f15d”,
            “rel”: “alternate”,
            “type”: “text/html”
          }
        ],
        “due_date”: “2024-04-18”,
        “outstanding_amount”: “178.99”,
        “currency”: {
          “id”: “CAD”,
          “displayed_as”: “Canadian Dollar (CAD)“,
          “$path”: “/currencies/CAD”
        },
        “status”: {
          “id”: “UNPAID”,
          “displayed_as”: “Unpaid”,
          “$path”: “/artefact_statuses/UNPAID”
        }
      },
      “audit_trail_id”: 132
    },
    “transaction_type”: {
      “id”: “PURCHASE_INVOICE”,
      “displayed_as”: “Vendor Bill”,
      “$path”: “/transaction_types/PURCHASE_INVOICE”
    },
    “postponed_accounting”: false,
    “import”: false,
    “vat_exempt_consignment”: false,
    “is_cis”: false,
    “has_cis_labour”: false,
    “has_cis_materials”: false,
    “contact”: {
      “id”: “5240dc26e0714437b797a9b083f32254",
      “displayed_as”: “Apple Inc (888888888)“,
      “$path”: “/contacts/5240dc26e0714437b797a9b083f32254",
      “created_at”: “2022-01-11T00:48:58Z”,
      “updated_at”: “2022-01-11T01:12:15Z”,
      “links”: [
        {
          “href”: “https://accounting.na.sageone.com/contacts/contacts/14647097”,
          “rel”: “alternate”,
          “type”: “text/html”
        }
      ],
      “contact_types”: [
        {
          “id”: “VENDOR”,
          “displayed_as”: “Vendor”,
          “$path”: “/contact_types/VENDOR”
        }
      ],
      “name”: “Apple Inc”,
      “reference”: “888888888",
      “default_purchase_ledger_account”: {
        “id”: “b4e954a2381d11ecbcc60e97dc3b579b”,
        “displayed_as”: “Inventory (1500)“,
        “$path”: “/ledger_accounts/b4e954a2381d11ecbcc60e97dc3b579b”,
        “created_at”: “2021-10-28T18:34:38Z”,
        “updated_at”: “2021-10-28T18:34:38Z”,
        “ledger_account_group”: {
          “id”: “ASSET”,
          “displayed_as”: “Asset”
        },
        “name”: “Inventory”,
        “display_name”: “Inventory”,
        “visible_scopes”: [
          “journals”,
          “other_payment”,
          “other_receipt”,
          “purchasing”,
          “reporting”
        ],
        “included_in_chart”: true,
        “nominal_code”: 1500,
        “ledger_account_type”: {
          “id”: “CURRENT_ASSETS”,
          “displayed_as”: “Assets”,
          “$path”: “/ledger_account_types/CURRENT_ASSETS”
        },
        “fixed_tax_rate”: false,
        “visible_in_banking”: false,
        “visible_in_expenses”: true,
        “visible_in_journals”: true,
        “visible_in_other_payments”: true,
        “visible_in_other_receipts”: true,
        “visible_in_reporting”: true,
        “visible_in_sales”: false,
        “is_control_account”: false,
        “display_formatted”: “1500 - Inventory”,
        “cis_materials”: false,
        “tax_instalment”: false,
        “cis_labour”: false,
        “gifi_code”: 1120
      },
      “tax_number”: “888888888RT0001”,
      “notes”: “Test Vendor Apple Memo”,
      “locale”: “en-CA”,
      “main_address”: {
        “id”: “2edd247ee13d4cdf9eb0cb5bf811aaf1",
        “displayed_as”: “701 W Georgia St\nFloor 3\nVancouver, BC V7Y 1G5",
        “$path”: “/addresses/2edd247ee13d4cdf9eb0cb5bf811aaf1",
        “contact”: {
          “id”: “5240dc26e0714437b797a9b083f32254”,
          “displayed_as”: “Apple Inc (888888888)“,
          “$path”: “/contacts/5240dc26e0714437b797a9b083f32254"
        },
        “address_type”: {
          “id”: “PURCHASING”,
          “displayed_as”: “Purchasing”,
          “$path”: “/address_types/PURCHASING”
        },
        “name”: “Invoice Address”,
        “address_line_1": “701 W Georgia St”,
        “address_line_2": “Floor 3”,
        “city”: “Vancouver”,
        “region”: “BC”,
        “postal_code”: “V7Y 1G5”,
        “country”: {
          “id”: “CA”,
          “displayed_as”: “Canada (CA)“,
          “$path”: “/countries/CA”
        },
        “country_group”: {
          “id”: “CA”,
          “displayed_as”: “Canada”,
          “$path”: “/country_groups/CA”
        },
        “is_main_address”: true,
        “created_at”: “2022-01-11T00:48:58Z”,
        “updated_at”: “2022-01-11T00:48:58Z”
      },
      “main_contact_person”: {
        “id”: “9669d99811994522a8e548ab502f07e9”,
        “displayed_as”: “Apple Seed”,
        “$path”: “/contact_persons/9669d99811994522a8e548ab502f07e9”,
        “contact_person_types”: [
          {
            “id”: “ACCOUNTS”,
            “displayed_as”: “Accounts”,
            “$path”: “/contact_person_types/ACCOUNTS”
          }
        ],
        “name”: “Apple Seed”,
        “telephone”: “9012345678",
        “mobile”: “1234567890",
        “email”: “[email protected]”,
        “is_main_contact”: true,
        “address”: {
          “id”: “2edd247ee13d4cdf9eb0cb5bf811aaf1",
          “displayed_as”: “701 W Georgia St\nFloor 3\nVancouver, BC V7Y 1G5",
          “$path”: “/addresses/2edd247ee13d4cdf9eb0cb5bf811aaf1"
        },
        “created_at”: “2022-01-11T00:48:58Z”,
        “updated_at”: “2022-01-11T00:48:58Z”
      },
      “bank_account_details”: {},
      “credit_days”: 30,
      “currency”: {
        “id”: “CAD”,
        “displayed_as”: “Canadian Dollar (CAD)“,
        “$path”: “/currencies/CAD”
      },
      “deletable”: false,
      “tax_treatment”: {
        “home_tax”: true,
        “eu_tax_registered”: false,
        “eu_not_tax_registered”: false,
        “rest_of_world_tax”: false
      },
      “email”: “[email protected]”,
      “tax_calculation”: “”,
      “gdpr_obfuscated”: false,
      “system”: false,
      “has_unfinished_recurring_invoices”: false,
      “cis_registered”: false,
      “ni_based”: false,
      “is_active”: true,
      “gb_based”: false,
      “destination_vat_blocking”: false
    },
    “base_currency_total_itc_amount”: 0,
    “total_itc_amount”: 0,
    “part_recoverable”: false,
    “contact_name”: “Apple Inc”,
    “contact_reference”: “888888888”,
    “total_quantity”: “8.0”,
    “net_amount”: “176.0”,
    “tax_amount”: “2.99”,
    “total_amount”: “178.99”,
    “payments_allocations_total_amount”: “0.0”,
    “payments_allocations_total_discount”: “0.0”,
    “total_paid”: “0.0”,
    “outstanding_amount”: “178.99”,
    “currency”: {
      “id”: “CAD”,
      “displayed_as”: “Canadian Dollar (CAD)“,
      “$path”: “/currencies/CAD”
    },
    “inverse_exchange_rate”: “1.0",
    “base_currency_net_amount”: “176.0",
    “base_currency_tax_amount”: “2.99",
    “base_currency_total_amount”: “178.99",
    “base_currency_outstanding_amount”: “178.99",
    “status”: {
      “id”: “UNPAID”,
      “displayed_as”: “Unpaid”,
      “$path”: “/artefact_statuses/UNPAID”
    },
    “tax_analysis”: [
      {
        “tax_rate”: {
          “id”: “CA_GST_PST_BC”,
          “displayed_as”: “GST & PST 12.00%“,
          “$path”: “/tax_rates/CA_GST_PST_BC”
        },
        “net_amount”: “176.0",
        “tax_amount”: “2.99",
        “total_amount”: “178.99",
        “goods_amount”: “0.0",
        “service_amount”: “0.0"
      }
    ],
    “payments_allocations”: [],
    “last_paid”: “”,
    “tax_address_region”: {
      “id”: “CA-BC”,
      “displayed_as”: “British Columbia”,
      “$path”: “/address_regions/CA-BC”
    },
    “tax_reconciled”: false,
    “migrated”: false
  },

 

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...