Skip to content

How to send raw requests?

TIP

Before that, we have different libraries for different languages.

Make sure you have looked at the libraries page.

General info

We have versioning in our API. It is always good practice to check the latest version of the API. In case of deprecations, we will highlight the date when the service/route/field will no longer be available.

Building the request

All the requests are built in the same pattern which includes the following:

  • package name and version
  • service
  • method

This is the example of an url for a request:

http
https://api.ibuy.exchange/invoice.v1.PubInvoiceService/CreateInvoice

Where invoice.v1 is the package name and version, PubInvoiceService is the service name and CreateInvoice is the method.

So, the raw curl of requests always looks like this:

shell
curl 'https://api.ibuy.exchange/invoice.v1.PubInvoiceService/CreateInvoice' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "amount": "130",
    "url_config": {
        "hook_url": "http://localhost:10000/api/hook"
    },
    "metadata": {
        "some-key": some-value 
    }
}'