Jump to content

how to contact developer services team


 Share

Recommended Posts

Hi Bill,

You can try reaching them on [email protected] or alternatively post your question in the community if it refers to Sage Business Cloud Accounting.


"the api rejecting valid vat exempt numbers" - What numbers are you referring to here please?

The valid tax_rate ID's for a UK Non VAT registered business are:

"$items": [
        {
            "id": "GB_STANDARD",
            "displayed_as": "Standard 20.00%",
            "$path": "/tax_rates/GB_STANDARD"
        },
        {
            "id": "GB_LOWER",
            "displayed_as": "Lower Rate 5.00%",
            "$path": "/tax_rates/GB_LOWER"
        },
        {
            "id": "GB_ZERO",
            "displayed_as": "Zero Rated 0.00%",
            "$path": "/tax_rates/GB_ZERO"
        },
        {
            "id": "GB_EXEMPT",
            "displayed_as": "Exempt 0.00%",
            "$path": "/tax_rates/GB_EXEMPT"
        },
        {
            "id": "GB_NO_TAX",
            "displayed_as": "No VAT",
            "$path": "/tax_rates/GB_NO_TAX"
        }
    ]

Thanks

Mark
 

Link to comment
Share on other sites

Good morning Mark

I've sent an email again to [email protected] which was the address given on the contact page. If that doesn't work, I'll try [email protected] but I don't want to tread on toes by annoying too many people. Just for your information, I'm having 2 problems with vat. The first is that vat numbers for northern ireland which is part of the uk have an "XI" prefix eg "XInnnnnn" (to do with brexit I presume). sage accounts only allows numbers with an "IE" or "GB" prefix when I try to create a new uk/ireland customer manually. The second problem relates to creating a new contact in Poland via php and api. I can create a contact manually but the api rejects the vat number "PL...." as invalid for the country Poland. I might be doing something stupid but I can't figure out where the fault lies. This is why I was keen to contact the dvelopers section

Regards, Bill

Link to comment
Share on other sites

 

Hi @WILLIAM GREENE.

The NI Tax Number requirement is known to product management but there is no date set for implementation.

For the Polish Customer, the below example presumes this is a UK VAT Registered business.

 

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://api.accounting.sage.com/v3.1/contacts');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Accept' => 'application/json',
  'Content-Type' => 'application/json',
  'Authorization' => 'Bearer eyJraWQiOiI0S0dUamZjlqZFOjHheHB4oMUkcxDOrrHaCUz-0d9QYlkmxCDpPM9GQwGSLakOTizZp0t15uc0mEZ8iA3cnrpcR9rHEtWaHP6m09BPvINOSQkCEl0XvMypZaHTjZ-UONInb_6-v_wbJe37FjJTWlD1IT47R_MlkcvjY5Y5uQyfXasS9II3_Tw9E89Gb4ky1B4fHITDOPiADLBQwr6IoaAGTCywTuAhs',
  'X-Business' => '5ffd916d9e83459da41a4a491622af90'
));
$request->setBody('{\n\n"contact": {\n"name":"POLISH",\n"contact_type_ids":["CUSTOMER"],\n"reference":"POL1",\n"tax_number":"PL1234567890",\n"locale":"en",\n"main_address":{\n"address_line_1":"1 Main Street",\n"address_line_2":"",\n"city":"Bolesławiec",\n"region":"",\n"postal_code":"59–700",\n"country_id":"PL",\n"country_group_id":"EU",\n"is_main_address":true\n},\n"main_contact_person":{\n"contact_person_type_ids":["SALES","PURCHASING","ACCOUNTS","DELIVERY"],\n"name":"Dave",\n"telephone":"",\n"mobile":"",\n"email":"",\n"fax":"",\n"is_main_contact":true,\n"is_preferred_contact":true\n},\n"tax_calculation":""\n}\n\n}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

 

{
    "contact": {
        "name": "POLISH",
        "contact_type_ids": [
            "CUSTOMER"
        ],
        "reference": "POL1",
        "tax_number": "PL1234567890",
        "locale": "en",
        "main_address": {
            "address_line_1": "1 Main Street",
            "address_line_2": "",
            "city": "Bolesławiec",
            "region": "",
            "postal_code": "59–700",
            "country_id": "PL",
            "country_group_id": "EU",
            "is_main_address": true
        },
        "main_contact_person": {
            "contact_person_type_ids": [
                "SALES",
                "PURCHASING",
                "ACCOUNTS",
                "DELIVERY"
            ],
            "name": "Dave",
            "telephone": "",
            "mobile": "",
            "email": "",
            "fax": "",
            "is_main_contact": true,
            "is_preferred_contact": true
        },
        "tax_calculation": ""
    }
}

 

 

Please provide any API returned error message should this still be an issue.

Thanks

Mark 

Link to comment
Share on other sites

Good morning Mark, Thats fantastic.  I had used "country_code" whereas it needs "country_id". I'll be more careful reading the documentation in future, sometimes I can't see the wood for the trees!

"country_code":"PL"  <= my error, I should use "country_id":"PL"

Regards, Bill

Link to comment
Share on other sites

Thanks for the update @WILLIAM GREENE,

I've had a look into the XI legislation and SBCA is compliant.

What it does is for businesses registered with an NI postcode selling goods to the EU it will add the XI prefix to the sales document as in the screenshot. This is only applicable to goods sold to EU VAT Registered customers.

I hope that helps.

Thanks

Screenshot 2024-06-21 at 10.45.54.png

Link to comment
Share on other sites

Hmmm. Thanks you very much for going to the trouble of researching it. But what should I enter? We're in Dublin and in the EU. Some of our customers are in Northern Ireland so they give us their XI vat number which we need to enter so they appear as vat exempt. But Sage will only accept IE or GB.

Regards, Bill

Link to comment
Share on other sites

Hi Mark, sorry for putting you to so much trouble. Our customers in N.I. give us their vat number which has an "XI" prefix. We need to enter the customer as export and therefore vat exempt and put their vat number on their card but we can't do this because the new customer form only allows the "IE" or "GB" prefix. So I'll get the girls to enter the vat number with a GB prefix and use some sticky notes on our computer screens with the names of these XI customers (we only have a few).

Many thanks for your help

Hope you have a good weekend

Bill

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...