Response errors and examples API Docs

Do you have any documentation on responses and errors?
For example, what is the response when we try to create a client that is already in the system?

And many others.
Thanks

A quick Google can find you this URL
https://api.quickfile.co.uk

What programming language are you using?

I have all that. Can you show me where to find:
“For example, what is the response when we try to create a client that is already in the system?”

Thanks

What programming language are you using?
Are you keeping a local client list?
What do you mean by already in the system?
How are you defining the same client?

When I want to make a new client I use Client_Search then Client_Update if found or Client_Create if not.

The API is very easy just make a test page in the programming language you are using and make a new client, the api will reply with the new client ID.

  • not important
  • Not relevant. But no.
  • I mean when a client is already on quickfile.
  • The same way Quickfile is defining them, which is also nice to have as part of the docs.

Making 3 requests for just creating 1 client makes little sense, when 90% is a new client and 10% is not.
But this is just an example.
I am just asking for documentation for the different responses and errors. A common thing on API docs.
If the answer is: there is none, just noted and please provided when you can.
If the answer is: yes, please provide a link to that part.

I would appreciate a little less aggressiveness on your replies.
Thanks.

Hi @expertoswp

This isn’t an API feature but one that can be found in the web interface too. The only restriction on clients is you can only have 1 with the same name. For example, “Company A Ltd” and “Company A Ltd” would be considered the same, but “Company A Ltd” and “Company A Limited” wouldn’t.

All errors are returned as JSON. For example, a duplicate client would return:

{
  "Errors": {
    "Error": [
      "A client record with this name already exists"
    ]
  }
}

Hope this helps.

1 Like

Thank you @QFMathew
It does help a lot.
I may suggest to add this to the API docs.
A list of responses with all the errors on each request would be the best, but having a general section with this information and how Quickfile works will be helpful.
The developers working on the integration may not know how Quickfile works and they will expect to find this information on the docs.

Thanks

I also noticed that errors are returned with a 200 response.
Maybe another code should be sent for those.
I won´t open another bug ticket, as I have not seen any good reception on the first one I made for the error 500.

Thanks for your feedback.

When testing on my end, I’m seeing an error 400 being returned, along with an “Errors” element. Are you seeing different to this? If so, do you have any examples, please?

I am getting a 200 response which is strange.
This is a create_invoice response:

[
    {
        "statusCode": 200,
        "headers": [
            {
                "name": "date",
                "value": "Mon, 29 Aug 2022 09:27:44 GMT"
            },
            {
                "name": "content-type",
                "value": "application/xml; charset=utf-8"
            },
            {
                "name": "content-length",
                "value": "196"
            },
            {
                "name": "connection",
                "value": "close"
            },
            {
                "name": "cache-control",
                "value": "no-cache"
            },
            {
                "name": "expires",
                "value": "-1"
            },
            {
                "name": "pragma",
                "value": "no-cache"
            },
            {
                "name": "set-cookie",
                "value": "ARRAffinity=;Path=/;HttpOnly;Secure;Domain=api.quickfile.co.uk"
            },
            {
                "name": "x-frame-options",
                "value": "DENY"
            },
            {
                "name": "cf-cache-status",
                "value": "DYNAMIC"
            },
            {
                "name": "expect-ct",
                "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\""
            },
            {
                "name": "server",
                "value": "cloudflare"
            },
            {
                "name": "cf-ray",
                "value": "742440a2ed5474-LHR"
            }
        ],
        "cookieHeaders": [
            "ARRAffinity=;Path=/;HttpOnly;Secure;Domain=api.quickfile.co.uk",
            "ARRAffinitySameSite=;Path=/;HttpOnly;SameSite=None;Secure;Domain=api.quickfile.co.uk"
        ],
        "data": {
            "Errors": {
                "Error": [
                    "18The element 'VatCodes' in namespace 'https://api.quickfile.co.uk' cannot contain text. List of possible elements expected: 'https://api.quickfile.co.uk:Code'."
                ]
            }
        },
        "fileSize": 196
    }
]

Hi @expertoswp

Thanks for the details. I’ve tried to replicate this using Postman, but I’m still seeing error 400:

Then it is a problem of the software I am using, somehow they are reporting the wrong code.
Not sure how that could happen but anyway, I will check the data content for errors anyway on my code and most probably move to another more reliable platform.
Thanks for debugging this.

1 Like

This topic was automatically closed after 5 days. New replies are no longer allowed.