1b.app
Link copied -

Need sample post request to use Storage api methods

Нужен пример запроса API для работы?
Не можете сформировать API запрос?
Вы всегда можете создать топик на нашем форуме и партнеры-интеграторы помогут в решении задачи! Создать топик
Hello!
Need an example post request to use Storage.
Now in the examples get-requests.
Where should the username and password be passed - in the headers or in the body of the request? What is the format of the request body?
Original question is available on version: ru

Answers:

Сусяк Ігор
Integrator.com.ua
Personal license
Tamara - axis here documentation https://crm-onebox.com/en/api/storage/
i application for get http://myboxurl/api/storage-translocation/get/?login=LOGIN&password=PASSWORD...
do you know your login and password?
04.10.2021, 21:55
Original comment available on version: ru


Susyak Igor
Integrator
Employee
Integrator.com.ua wrote:
Tamara - axis here documentation https://crm-onebox.com/en/api/storage/
i application for get http://myboxurl/api/storage-translocation/get/?login=LOGIN&password=PASSWORD...
do you know your login and password?

We twerked. We need a post-application.
04.10.2021, 22:03
Original comment available on version: ru

Сусяк Ігор
Integrator.com.ua
Personal license
a, also Method: /api/storage-translocation/
butt: http://myboxurl/api/storage-translocation/?login=LOGIN&password=PASSWORD&... ][currency]=USD&productArray[1][serialnumber]=123456
05.10.2021, 10:08
Original comment available on version: ru

These are all get requests, and we need a post request!
05.10.2021, 12:00
Original comment available on version: ru


Chausova Tamara wrote:
These are all get requests, and we need a post request!

This is all the url of the method where to send the request
If you send in PHP from a third-party application, try as in the screenshot
parameter curl_setopt($ch,CURLOPT_POST, true) - will send a request using the POST method
05.10.2021, 12:11
Original comment available on version: ru


Derkach Dmytriy
OneBox production
Employee wrote:

Chausova Tamara wrote:
These are all get requests, and we need a post request!

This is all the url of the method where to send the request
If you send in PHP from a third-party application, try as in the screenshot
parameter curl_setopt($ch,CURLOPT_POST, true) - will send a request using the POST method


https://developer.fortnox.se/documentation/resources/invoices/ - an example of how requests are described
Create an invoice
The created invoice will be returned if everything succeeded, if there was any problems an error will be returned.
You must specify a customer to create an invoice. It's possible to create an invoice without rows, although we encourage you to add them if you can.
Predefined values will be used for properties where it applies, the values can be changed in the settings for the Fortnox account. Predefined values will always be overwritten by values provided through the API.
Examples
CURL
PHP
RUBY
PYTHON
C#
Request
curl -X "POST" "https://api.fortnox.se/3/invoices" \
-H "Access-Token: 61cf63ae-4ab9-4a95-9db5-753781c4f41f" \
-H "Client-Secret: 3Er4kHXZTJ" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d $'{
"Invoice": {
"CustomerNumber": "100",
"InvoiceRows": [
here it is clear what needs to be passed in the headers, what is in the body.yu and what format of the request body
can we get a similar example or not?
05.10.2021, 13:29
Original comment available on version: ru

post in php is passed like this
$url = "";
$post = array(
'login' => 'kjuby',
'pass' => 'pass',
'info' => array(
'test1' => '1',
'test2' => '2'
)
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
$result = curl_exec($ch);
curl_close($ch);
the key is http_build_query instead of login, pass and other fields, insert the variables you need.
24.05.2022, 17:36
Original comment available on version: ru

Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter. Log in and comment