Jump to content

Railz Dev

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by Railz Dev

  1. Thank you @Steel, Mark. Is there a way to do this using Journals, or only with the Bank Transfer endpoint?
  2. Hello, I was wondering if there is a way to record a transfer between two accounts, when one or both are foreign currency accounts, using the API? Using Journals endpoint I get the following error message: "validation": { "errors": [ { "field": "journal_lines.foreign_currency.currency_debit", "message": "This field is required." }, { "field": "journal_lines.foreign_currency.currency_credit", "message": "This field is required." }, { "field": "journal_lines.foreign_currency.exchange_rate", "message": "This field is required." }, { "field": "journal_lines.foreign_currency.exchange_rate", "message": "is not a number" } ] } If I try with Bank Transfers I get: "validation": { "errors": [ { "field": "", "message": "You cannot make the bank transfer for foreign currency via api." } ] } Any ideas? Thanks!
  3. Hi!! I would like to know if there is any API to consume/post BankFeeds to Sage Business Cloud. Thanks!
  4. Hi, I would like to know if there is an API endpoint you have to access and create Bank Feeds. Thanks
  5. Im getting the next error when I try to create a bill: {'message':'Request failed with status code 500','name':'AxiosError','config':{'transitional':{'silentJSONParsing':true,'forcedJSONParsing':true,'clarifyTimeoutError':false},'transformRequest':[null],'transformResponse':[null],'timeout':0,'xsrfCookieName':'XSRF-TOKEN','xsrfHeaderName':'X-XSRF-TOKEN','maxContentLength':-1,'maxBodyLength':-1,'env':{},'headers':{'Accept':'application/json, text/plain, */*','Content-Type':'application/json','authorization':'Bearer eyJhbGciOiJSUzUxMiIsImtpZCI6IjFQWGpwTC05TWdXM0k0MkxITzhLdzYxN3RWUXdLTkRNQUNiQXRoSGtDRmc9In0.eyJqdGkiOiIxMzE2YmI2Yi03YWQ5LTRmZDUtYWU4MC05MGI0NzEzMGY1MWIiLCJpYXQiOjE2ODE4ODk0NjgsImV4cCI6MTY4MTg4OTc2OCwiaXNzIjoib2F1dGguYXdzLnNiYy1hY2NvdW50aW5nLnNhZ2UuY29tIiwic3ViIjoiZGQyZGUwZDYtOTcxZi1iNWQ2LTBhM2EtM2E3Y2Y3YzE4NDY1IiwiYXVkIjoiYXBpLnNiYy1hY2NvdW50aW5nLnNhZ2UuY29tIiwiYXpwIjoiNTdlMTgwOWYtNTM1NS00MGQ5LTg2N2YtNWE2NjI3ZWVhODQ4LzM0NDFiNDdjLWE2NDAtNDQxNi04MGE1LTc5ZTFiZjdlMmE4ZCIsImNvdW50cnkiOiJDQSIsInNjb3BlcyI6ImFjY291bnRpbmc6cncgY29yZTpydyIsInVzYWdlX3BsYW5fY29kZSI6ImV4dGVybmFsIn0.CxFVgS-suJRUkcTSiAJHRMYR7Pvr8cfRtGLvXnc7RYqP_N6F0ZyAT8kJ3xiGPriQ_Jwjw3hadfyWeUVXmzu2TtfLye5MfDEMqxhIHwV7-O9J5N9K84YgUvlX6ChkvzFTAKEoRupSGNIkt2-FUqNWf1ggMNfZQ8kaXw6TtxEZZiPq6Xn0sUMh45ALqddlcFeFQWIpEvuu0pWwhUHZqlwv65CZZV_isI8v93CV7d08zyA6ew95ScX9AjoxAuOVVonZTLahdRAhSu17hkVptCjGo7ByG4HWkYQT1uTAA2cjbUpNc7pNYhFE_SJ3ZLUwaUct0Sv-60WQP80D3feaknXqLboM7xDuaNrwh0vi6VFnVwWVSKW3rtPx-pNvypDIx3IzY9LP9JuvVdBln4ZPJgduz69umS-pNkleCvXk8Fg1tTmW3cY2_uXqYE3T5b_f6ZwSTxV5s5pCCuw3dMZXomXfvDdT4JOji48-5DicCsK6arR8qY_LKEjjEaLf2ITnXITDS0JTQntL3EWPAYNxRT8TqSaQSXKsPmHOmKAz_iY5arKHT6AxyHQoZLC6uSeXIknz-63SK5ZrPCFdY8KLeIYERXf2Ewe9IiSH8NKu_u9Qb1D_RfF8hNJA6TAMH0VrNoH61FOLXC-BVYn5pXxL3ql-Lsu6H-JIMS0tra_HuLQsqec','User-Agent':'axios/0.27.2','Content-Length':372},'url':'https://api.accounting.sage.com/v3.1/purchase_invoices','method':'post','data':'{\'purchase_invoice\':{\'due_date\':\'2024-04-19\',\'date\':\'2023-04-19\',\'contact_id\':\'5240dc26e0714437b797a9b083f32254\',\'exchange_rate\':\'1\',\'invoice_lines\':[{\'description\':\'cf85707a-5081-4251-ba0d-c96d142ff717\',\'unit_price\':125,\'quantity\':329,\'currency_tax_amount\':3.99,\'total_amount\':41125,\'ledger_account_id\':\'b4e9d889381d11ecbcc60e97dc3b579b\',\'tax_rate_id\':\'CA_GST_PST_BC\'}]}}'},'code':'ERR_BAD_RESPONSE','status':500} The payload we are using is: { "purchase_invoice": [ { "due_date": "2024-04-19", "date": "2023-04-19", "contact_id": "9bb46a4136e64b36819f34f6a7f75952", "exchange_rate": "1", "invoice_lines": [ { "description": "cf85707a-5081-4251-ba0d-c96d142ff717", "unit_price": 125, "quantity": 329, "currency_tax_amount": 3.99, "total_amount": 41125, "ledger_account_id": "b4e9d889381d11ecbcc60e97dc3b579b", "tax_rate_id": "CA_GST_PST_BC" } ] } ] } Any idea?
  6. Hi Mark this is the payload { "contact": { "railzRequestSourceId": "db4424e5551a40cb93a7a06ded8e3c83", "id": "db4424e5551a40cb93a7a06ded8e3c83", "contact_type_ids": [ "Customer" ], "main_contact_person": { "name": "customer1 9f037ec6-4c0b-43ac-ae0f-64bfb916098b", "email": "[email protected]" }, "name": "customer1 9f037ec6-4c0b-43ac-ae0f-64bfb916098b", "currency_id": "CAD", "delivery_address": { "name": "Shipping Address" }, "displayed_as": "Customer 0b2cf704-bb66-42bb-914f-9e89d6033376", "X_path": "/contacts/db4424e5551a40cb93a7a06ded8e3c83", "created_at": "2023-02-16T16:51:39Z", "updated_at": "2023-02-16T16:51:39Z", "links": [ { "href": "https://accounting.na.sageone.com/contacts/customers/18801651", "rel": "alternate", "type": "text/html" } ], "balance": "0.0", "contact_types": [ { "id": "CUSTOMER", "displayed_as": "Customer", "$path": "/contact_types/CUSTOMER" } ], "default_sales_ledger_account": { "id": "b4e9c1f1381d11ecbcc60e97dc3b579b", "displayed_as": "Sales - Products (4000)", "$path": "/ledger_accounts/b4e9c1f1381d11ecbcc60e97dc3b579b", "created_at": "2021-10-28T18:34:38Z", "updated_at": "2021-10-28T18:34:38Z", "ledger_account_group": { "id": "INCOME", "displayed_as": "Income" }, "name": "Sales - Products", "display_name": "Sales - Products", "visible_scopes": [ "journals", "other_receipt", "reporting", "sales" ], "included_in_chart": true, "nominal_code": 4000, "ledger_account_type": { "id": "SALES", "displayed_as": "Revenue", "$path": "/ledger_account_types/SALES" }, "fixed_tax_rate": false, "visible_in_banking": false, "visible_in_expenses": false, "visible_in_journals": true, "visible_in_other_payments": false, "visible_in_other_receipts": true, "visible_in_reporting": true, "visible_in_sales": true, "is_control_account": false, "display_formatted": "4000 - Sales - Products", "cis_materials": false, "tax_instalment": false, "cis_labour": false, "gifi_code": 8000 }, "locale": "en-CA", "main_address": { "id": "4c85f7916ad14de9b2234f60f11e7844", "displayed_as": "", "$path": "/addresses/4c85f7916ad14de9b2234f60f11e7844", "contact": { "id": "db4424e5551a40cb93a7a06ded8e3c83", "displayed_as": "Customer 0b2cf704-bb66-42bb-914f-9e89d6033376", "$path": "/contacts/db4424e5551a40cb93a7a06ded8e3c83" }, "address_type": { "id": "DELIVERY", "displayed_as": "Delivery", "$path": "/address_types/DELIVERY" }, "name": "Main Address", "country": { "id": "CA", "displayed_as": "Canada (CA)", "$path": "/countries/CA" }, "country_group": { "id": "ALL", "displayed_as": "Other", "$path": "/country_groups/ALL" }, "is_main_address": true, "created_at": "2023-02-16T16:51:39Z", "updated_at": "2023-02-16T16:51:39Z" }, "preferred_address": { "id": "4c85f7916ad14de9b2234f60f11e7844", "displayed_as": "", "$path": "/addresses/4c85f7916ad14de9b2234f60f11e7844", "contact": { "id": "db4424e5551a40cb93a7a06ded8e3c83", "displayed_as": "Customer 0b2cf704-bb66-42bb-914f-9e89d6033376", "$path": "/contacts/db4424e5551a40cb93a7a06ded8e3c83" }, "address_type": { "id": "DELIVERY", "displayed_as": "Delivery", "$path": "/address_types/DELIVERY" }, "name": "Main Address", "country": { "id": "CA", "displayed_as": "Canada (CA)", "$path": "/countries/CA" }, "country_group": { "id": "ALL", "displayed_as": "Other", "$path": "/country_groups/ALL" }, "is_main_address": true, "created_at": "2023-02-16T16:51:39Z", "updated_at": "2023-02-16T16:51:39Z" }, "preferred_contact_person": { "id": "49e1e1188283403d81fc107f472ad20b", "displayed_as": "Customer 0b2cf704-bb66-42bb-914f-9e89d6033376", "$path": "/contact_persons/49e1e1188283403d81fc107f472ad20b", "contact_person_types": [ { "id": "ACCOUNTS", "displayed_as": "Accounts", "$path": "/contact_person_types/ACCOUNTS" } ], "name": "Customer 0b2cf704-bb66-42bb-914f-9e89d6033376", "is_main_contact": true, "address": { "id": "4c85f7916ad14de9b2234f60f11e7844", "displayed_as": "", "$path": "/addresses/4c85f7916ad14de9b2234f60f11e7844" }, "created_at": "2023-02-16T16:51:39Z", "updated_at": "2023-02-16T16:51:39Z" }, "bank_account_details": {}, "product_sales_price_type": { "id": "0d7fdb642e8543aa989f7a0849c80f1b", "displayed_as": "Sales Price", "$path": "/product_sales_price_types/0d7fdb642e8543aa989f7a0849c80f1b" }, "deletable": true, "tax_treatment": { "home_tax": true, "eu_tax_registered": false, "eu_not_tax_registered": false, "rest_of_world_tax": false }, "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, "send_statements": true, "statement_run": { "id": "statement_delivery_method_print", "name": "By post (PDF Generated)" } }, }
  7. 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 },
  8. When Im trying to create a new Contact I'm getting this error. "validation" : { "errors" : [ { "field" : "contact[statement_run]", "message" : "contact[statement_run] is invalid" } ] Any idea?
  9. Im trying to update a contact and Im getting the next error: "message" : "The request contained parameters that are restricted for Accounting in Canada [tax_calculation]" Can someone let me know what is the issue? Thanks
×
×
  • Create New...