Skip to main content
POST
/
warehouses
Create warehouse
curl --request POST \
  --url https://app.fintoro.sk/api/public/v1/warehouses \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Main warehouse",
  "code": "MAIN-WH",
  "inboundNumericalSeriesPattern": "INB-(YY)-(CCCC)",
  "inboundNumericalSeriesNextNumber": 1,
  "outboundNumericalSeriesPattern": "OUT-(YY)-(CCCC)",
  "outboundNumericalSeriesNextNumber": 1
}
'
import requests

url = "https://app.fintoro.sk/api/public/v1/warehouses"

payload = {
    "name": "Main warehouse",
    "code": "MAIN-WH",
    "inboundNumericalSeriesPattern": "INB-(YY)-(CCCC)",
    "inboundNumericalSeriesNextNumber": 1,
    "outboundNumericalSeriesPattern": "OUT-(YY)-(CCCC)",
    "outboundNumericalSeriesNextNumber": 1
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    name: 'Main warehouse',
    code: 'MAIN-WH',
    inboundNumericalSeriesPattern: 'INB-(YY)-(CCCC)',
    inboundNumericalSeriesNextNumber: 1,
    outboundNumericalSeriesPattern: 'OUT-(YY)-(CCCC)',
    outboundNumericalSeriesNextNumber: 1
  })
};

fetch('https://app.fintoro.sk/api/public/v1/warehouses', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.fintoro.sk/api/public/v1/warehouses",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'name' => 'Main warehouse',
    'code' => 'MAIN-WH',
    'inboundNumericalSeriesPattern' => 'INB-(YY)-(CCCC)',
    'inboundNumericalSeriesNextNumber' => 1,
    'outboundNumericalSeriesPattern' => 'OUT-(YY)-(CCCC)',
    'outboundNumericalSeriesNextNumber' => 1
  ]),
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://app.fintoro.sk/api/public/v1/warehouses"

	payload := strings.NewReader("{\n  \"name\": \"Main warehouse\",\n  \"code\": \"MAIN-WH\",\n  \"inboundNumericalSeriesPattern\": \"INB-(YY)-(CCCC)\",\n  \"inboundNumericalSeriesNextNumber\": 1,\n  \"outboundNumericalSeriesPattern\": \"OUT-(YY)-(CCCC)\",\n  \"outboundNumericalSeriesNextNumber\": 1\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://app.fintoro.sk/api/public/v1/warehouses")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Main warehouse\",\n  \"code\": \"MAIN-WH\",\n  \"inboundNumericalSeriesPattern\": \"INB-(YY)-(CCCC)\",\n  \"inboundNumericalSeriesNextNumber\": 1,\n  \"outboundNumericalSeriesPattern\": \"OUT-(YY)-(CCCC)\",\n  \"outboundNumericalSeriesNextNumber\": 1\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://app.fintoro.sk/api/public/v1/warehouses")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Main warehouse\",\n  \"code\": \"MAIN-WH\",\n  \"inboundNumericalSeriesPattern\": \"INB-(YY)-(CCCC)\",\n  \"inboundNumericalSeriesNextNumber\": 1,\n  \"outboundNumericalSeriesPattern\": \"OUT-(YY)-(CCCC)\",\n  \"outboundNumericalSeriesNextNumber\": 1\n}"

response = http.request(request)
puts response.read_body
{
  "id": 301,
  "name": "Main warehouse",
  "code": "MAIN-WH",
  "inboundNumericalSeriesPattern": "INB-(YY)-(CCCC)",
  "inboundNumericalSeriesNextNumber": 12,
  "outboundNumericalSeriesPattern": "OUT-(YY)-(CCCC)",
  "outboundNumericalSeriesNextNumber": 8
}
{
  "message": "The given data was invalid.",
  "errors": {}
}
{
  "message": "Too Many Attempts."
}
{
  "message": "Server Error"
}
{
  "message": "Service Unavailable"
}

Authorizations

Authorization
string
header
required

Bearer token created for a specific company in Integrations → API.

Body

application/json

Payload used to create a warehouse. All business fields are required.

name
string
required

Warehouse name.

Maximum string length: 255
Example:

"Main warehouse"

code
string
required

Internal warehouse code unique within the token scope.

Maximum string length: 255
Example:

"MAIN-WH"

inboundNumericalSeriesPattern
string
required

Numbering-series pattern for warehouse inbound receipts. It must contain a counter token.

Maximum string length: 255
Example:

"INB-(YY)-(CCCC)"

inboundNumericalSeriesNextNumber
integer
required

Next sequence number for the inbound series. Minimum value is 1.

Required range: x >= 1
Example:

1

outboundNumericalSeriesPattern
string
required

Numbering-series pattern for warehouse outbound receipts. It must contain a counter token.

Maximum string length: 255
Example:

"OUT-(YY)-(CCCC)"

outboundNumericalSeriesNextNumber
integer
required

Next sequence number for the outbound series. Minimum value is 1.

Required range: x >= 1
Example:

1

Response

Warehouse created.

Warehouse, including inbound and outbound numbering-series configuration.

id
integer

Internal warehouse ID in Fintoro.

Example:

301

name
string

Warehouse name displayed in Fintoro.

Example:

"Main warehouse"

code
string

Internal warehouse code unique within the token scope.

Example:

"MAIN-WH"

inboundNumericalSeriesPattern
string

Numbering-series pattern used for warehouse inbound receipts of this warehouse.

Example:

"INB-(YY)-(CCCC)"

inboundNumericalSeriesNextNumber
integer

Next sequence number that will be used when automatically generating a warehouse inbound receipt.

Example:

12

outboundNumericalSeriesPattern
string

Numbering-series pattern used for warehouse outbound receipts of this warehouse.

Example:

"OUT-(YY)-(CCCC)"

outboundNumericalSeriesNextNumber
integer

Next sequence number that will be used when automatically generating a warehouse outbound receipt.

Example:

8