{"openapi":"3.1.0","info":{"title":"Ledga viešas API","version":"1.0.0","description":"REST API integracijoms. Autentifikacija: `Authorization: Bearer ak_…` (įmonės API raktas). Sąrašai – kursoriniai puslapiai (`limit`, `cursor`, `updated_since`). Sumos – dešimtainės eilutės (\"123.45\"). POST užklausoms rekomenduojama `Idempotency-Key` antraštė. Webhook'ai pasirašomi HMAC-SHA256 (`X-Ledga-Signature`; ta pati reikšmė siunčiama ir senu pavadinimu `X-Apskaita-Signature`)."},"servers":[{"url":"/"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"ak_…"}}},"security":[{"apiKey":[]}],"paths":{"/v1/partners":{"get":{"summary":"Klientų sąrašas","tags":["Klientai"],"description":"Reikalinga teisė: `catalogs:read`","parameters":[{"name":"limit","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":50,"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":500}},{"name":"updated_since","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"q","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":50},"name":{"type":"string","minLength":1,"maxLength":300},"kind":{"default":"legal","type":"string","enum":["legal","natural"]},"registrationCode":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"vatCode":{"anyOf":[{},{"type":"null"}]},"countryCode":{"default":"LT","type":"string","minLength":2,"maxLength":2},"isCustomer":{"default":true,"type":"boolean"},"isSupplier":{"default":false,"type":"boolean"},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"website":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"paymentTermDays":{"default":14,"type":"integer","minimum":0,"maximum":3650},"creditLimit":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},{"type":"null"}]},"currencyCode":{"default":"EUR","type":"string","minLength":3,"maxLength":3},"accountingCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"priceCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"groupId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"isActive":{"default":true,"type":"boolean"},"customFields":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]}},"addresses":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"default":"legal","type":"string","enum":["legal","delivery","correspondence"]},"street":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"postalCode":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"countryCode":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"isDefault":{"default":false,"type":"boolean"}},"required":["kind","isDefault"],"additionalProperties":false}},"contacts":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":300},"position":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},"bankAccounts":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"iban":{"type":"string","pattern":"^[A-Z]{2}\\d{2}[A-Z0-9]{8,30}$"},"bankName":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"swift":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"currencyCode":{"anyOf":[{"type":"string","minLength":3,"maxLength":3},{"type":"null"}]},"isDefault":{"default":false,"type":"boolean"}},"required":["iban","isDefault"],"additionalProperties":false}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["code","name","kind","countryCode","isCustomer","isSupplier","paymentTermDays","currencyCode","isActive","customFields","addresses","contacts","bankAccounts","id","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}},"post":{"summary":"Sukurti klientą","tags":["Klientai"],"description":"Reikalinga teisė: `catalogs:create`","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":50},"name":{"type":"string","minLength":1,"maxLength":300},"kind":{"default":"legal","type":"string","enum":["legal","natural"]},"registrationCode":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"vatCode":{"type":["string","null"]},"countryCode":{"default":"LT","type":"string","minLength":2,"maxLength":2},"isCustomer":{"default":true,"type":"boolean"},"isSupplier":{"default":false,"type":"boolean"},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"website":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"paymentTermDays":{"default":14,"type":"integer","minimum":0,"maximum":3650},"creditLimit":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},{"type":"null"}]},"currencyCode":{"default":"EUR","type":"string","minLength":3,"maxLength":3},"accountingCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"priceCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"groupId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"isActive":{"default":true,"type":"boolean"},"customFields":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]}},"addresses":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"default":"legal","type":"string","enum":["legal","delivery","correspondence"]},"street":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"postalCode":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"countryCode":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"isDefault":{"default":false,"type":"boolean"}}}},"contacts":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":300},"position":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["name"]}},"bankAccounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"iban":{"type":"string"},"bankName":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"swift":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"currencyCode":{"anyOf":[{"type":"string","minLength":3,"maxLength":3},{"type":"null"}]},"isDefault":{"default":false,"type":"boolean"}},"required":["iban"]}}},"required":["code","name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":50},"name":{"type":"string","minLength":1,"maxLength":300},"kind":{"default":"legal","type":"string","enum":["legal","natural"]},"registrationCode":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"vatCode":{"anyOf":[{},{"type":"null"}]},"countryCode":{"default":"LT","type":"string","minLength":2,"maxLength":2},"isCustomer":{"default":true,"type":"boolean"},"isSupplier":{"default":false,"type":"boolean"},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"website":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"paymentTermDays":{"default":14,"type":"integer","minimum":0,"maximum":3650},"creditLimit":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},{"type":"null"}]},"currencyCode":{"default":"EUR","type":"string","minLength":3,"maxLength":3},"accountingCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"priceCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"groupId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"isActive":{"default":true,"type":"boolean"},"customFields":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]}},"addresses":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"default":"legal","type":"string","enum":["legal","delivery","correspondence"]},"street":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"postalCode":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"countryCode":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"isDefault":{"default":false,"type":"boolean"}},"required":["kind","isDefault"],"additionalProperties":false}},"contacts":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":300},"position":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},"bankAccounts":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"iban":{"type":"string","pattern":"^[A-Z]{2}\\d{2}[A-Z0-9]{8,30}$"},"bankName":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"swift":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"currencyCode":{"anyOf":[{"type":"string","minLength":3,"maxLength":3},{"type":"null"}]},"isDefault":{"default":false,"type":"boolean"}},"required":["iban","isDefault"],"additionalProperties":false}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["code","name","kind","countryCode","isCustomer","isSupplier","paymentTermDays","currencyCode","isActive","customFields","addresses","contacts","bankAccounts","id","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/partners/{id}":{"get":{"summary":"Klientas","tags":["Klientai"],"description":"Reikalinga teisė: `catalogs:read`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":50},"name":{"type":"string","minLength":1,"maxLength":300},"kind":{"default":"legal","type":"string","enum":["legal","natural"]},"registrationCode":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"vatCode":{"anyOf":[{},{"type":"null"}]},"countryCode":{"default":"LT","type":"string","minLength":2,"maxLength":2},"isCustomer":{"default":true,"type":"boolean"},"isSupplier":{"default":false,"type":"boolean"},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"website":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"paymentTermDays":{"default":14,"type":"integer","minimum":0,"maximum":3650},"creditLimit":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},{"type":"null"}]},"currencyCode":{"default":"EUR","type":"string","minLength":3,"maxLength":3},"accountingCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"priceCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"groupId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"isActive":{"default":true,"type":"boolean"},"customFields":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]}},"addresses":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"default":"legal","type":"string","enum":["legal","delivery","correspondence"]},"street":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"postalCode":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"countryCode":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"isDefault":{"default":false,"type":"boolean"}},"required":["kind","isDefault"],"additionalProperties":false}},"contacts":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":300},"position":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},"bankAccounts":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"iban":{"type":"string","pattern":"^[A-Z]{2}\\d{2}[A-Z0-9]{8,30}$"},"bankName":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"swift":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"currencyCode":{"anyOf":[{"type":"string","minLength":3,"maxLength":3},{"type":"null"}]},"isDefault":{"default":false,"type":"boolean"}},"required":["iban","isDefault"],"additionalProperties":false}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["code","name","kind","countryCode","isCustomer","isSupplier","paymentTermDays","currencyCode","isActive","customFields","addresses","contacts","bankAccounts","id","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}},"patch":{"summary":"Pakeisti klientą","tags":["Klientai"],"description":"Reikalinga teisė: `catalogs:update`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":50},"name":{"type":"string","minLength":1,"maxLength":300},"kind":{"type":"string","enum":["legal","natural"]},"registrationCode":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"vatCode":{"type":["string","null"]},"countryCode":{"type":"string","minLength":2,"maxLength":2},"isCustomer":{"type":"boolean"},"isSupplier":{"type":"boolean"},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"website":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"paymentTermDays":{"type":"integer","minimum":0,"maximum":3650},"creditLimit":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},{"type":"null"}]},"currencyCode":{"type":"string","minLength":3,"maxLength":3},"accountingCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"priceCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"groupId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"isActive":{"type":"boolean"},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]}},"addresses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"default":"legal","type":"string","enum":["legal","delivery","correspondence"]},"street":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"postalCode":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"countryCode":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"isDefault":{"default":false,"type":"boolean"}}}},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":300},"position":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["name"]}},"bankAccounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"iban":{"type":"string"},"bankName":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"swift":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"currencyCode":{"anyOf":[{"type":"string","minLength":3,"maxLength":3},{"type":"null"}]},"isDefault":{"default":false,"type":"boolean"}},"required":["iban"]}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":50},"name":{"type":"string","minLength":1,"maxLength":300},"kind":{"default":"legal","type":"string","enum":["legal","natural"]},"registrationCode":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"vatCode":{"anyOf":[{},{"type":"null"}]},"countryCode":{"default":"LT","type":"string","minLength":2,"maxLength":2},"isCustomer":{"default":true,"type":"boolean"},"isSupplier":{"default":false,"type":"boolean"},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"website":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"paymentTermDays":{"default":14,"type":"integer","minimum":0,"maximum":3650},"creditLimit":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},{"type":"null"}]},"currencyCode":{"default":"EUR","type":"string","minLength":3,"maxLength":3},"accountingCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"priceCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"groupId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"isActive":{"default":true,"type":"boolean"},"customFields":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]}},"addresses":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"default":"legal","type":"string","enum":["legal","delivery","correspondence"]},"street":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"postalCode":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"countryCode":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"isDefault":{"default":false,"type":"boolean"}},"required":["kind","isDefault"],"additionalProperties":false}},"contacts":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":300},"position":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},"bankAccounts":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"iban":{"type":"string","pattern":"^[A-Z]{2}\\d{2}[A-Z0-9]{8,30}$"},"bankName":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"swift":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"currencyCode":{"anyOf":[{"type":"string","minLength":3,"maxLength":3},{"type":"null"}]},"isDefault":{"default":false,"type":"boolean"}},"required":["iban","isDefault"],"additionalProperties":false}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["code","name","kind","countryCode","isCustomer","isSupplier","paymentTermDays","currencyCode","isActive","customFields","addresses","contacts","bankAccounts","id","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/items":{"get":{"summary":"Prekių ir paslaugų sąrašas","tags":["Prekės"],"description":"Reikalinga teisė: `catalogs:read`","parameters":[{"name":"limit","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":50,"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":500}},{"name":"updated_since","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"q","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":50},"name":{"type":"string","minLength":1,"maxLength":300},"nameEn":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"type":{"default":"goods","type":"string","enum":["goods","service","kit"]},"unitId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"groupId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"accountingCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"salesPrice":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"purchasePrice":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"weightKg":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"netWeightKg":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"cnCode":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"originCountryCode":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"isActive":{"default":true,"type":"boolean"},"customFields":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]}},"barcodes":{"default":[],"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"alternativeUnits":{"default":[],"type":"array","items":{"type":"object","properties":{"unitId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"factor":{"type":"string","pattern":"^\\d{1,13}(\\.\\d{1,6})?$"}},"required":["unitId","factor"],"additionalProperties":false}},"kitComponents":{"default":[],"type":"array","items":{"type":"object","properties":{"componentItemId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"quantity":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"}},"required":["componentItemId","quantity"],"additionalProperties":false}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["code","name","type","unitId","isActive","customFields","barcodes","alternativeUnits","kitComponents","id","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}},"post":{"summary":"Sukurti prekę","tags":["Prekės"],"description":"Reikalinga teisė: `catalogs:create`","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":50},"name":{"type":"string","minLength":1,"maxLength":300},"nameEn":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"type":{"default":"goods","type":"string","enum":["goods","service","kit"]},"unitId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"groupId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"accountingCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"salesPrice":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"purchasePrice":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"weightKg":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"netWeightKg":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"cnCode":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"originCountryCode":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"isActive":{"default":true,"type":"boolean"},"customFields":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]}},"barcodes":{"default":[],"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"alternativeUnits":{"default":[],"type":"array","items":{"type":"object","properties":{"unitId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"factor":{"type":"string","pattern":"^\\d{1,13}(\\.\\d{1,6})?$"}},"required":["unitId","factor"]}},"kitComponents":{"default":[],"type":"array","items":{"type":"object","properties":{"componentItemId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"quantity":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"}},"required":["componentItemId","quantity"]}}},"required":["code","name","unitId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":50},"name":{"type":"string","minLength":1,"maxLength":300},"nameEn":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"type":{"default":"goods","type":"string","enum":["goods","service","kit"]},"unitId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"groupId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"accountingCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"salesPrice":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"purchasePrice":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"weightKg":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"netWeightKg":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"cnCode":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"originCountryCode":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"isActive":{"default":true,"type":"boolean"},"customFields":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]}},"barcodes":{"default":[],"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"alternativeUnits":{"default":[],"type":"array","items":{"type":"object","properties":{"unitId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"factor":{"type":"string","pattern":"^\\d{1,13}(\\.\\d{1,6})?$"}},"required":["unitId","factor"],"additionalProperties":false}},"kitComponents":{"default":[],"type":"array","items":{"type":"object","properties":{"componentItemId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"quantity":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"}},"required":["componentItemId","quantity"],"additionalProperties":false}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["code","name","type","unitId","isActive","customFields","barcodes","alternativeUnits","kitComponents","id","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/items/{id}":{"get":{"summary":"Prekė / paslauga","tags":["Prekės"],"description":"Reikalinga teisė: `catalogs:read`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":50},"name":{"type":"string","minLength":1,"maxLength":300},"nameEn":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"type":{"default":"goods","type":"string","enum":["goods","service","kit"]},"unitId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"groupId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"accountingCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"salesPrice":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"purchasePrice":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"weightKg":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"netWeightKg":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"cnCode":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"originCountryCode":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"isActive":{"default":true,"type":"boolean"},"customFields":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]}},"barcodes":{"default":[],"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"alternativeUnits":{"default":[],"type":"array","items":{"type":"object","properties":{"unitId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"factor":{"type":"string","pattern":"^\\d{1,13}(\\.\\d{1,6})?$"}},"required":["unitId","factor"],"additionalProperties":false}},"kitComponents":{"default":[],"type":"array","items":{"type":"object","properties":{"componentItemId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"quantity":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"}},"required":["componentItemId","quantity"],"additionalProperties":false}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["code","name","type","unitId","isActive","customFields","barcodes","alternativeUnits","kitComponents","id","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}},"patch":{"summary":"Pakeisti prekę","tags":["Prekės"],"description":"Reikalinga teisė: `catalogs:update`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":50},"name":{"type":"string","minLength":1,"maxLength":300},"nameEn":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"type":{"type":"string","enum":["goods","service","kit"]},"unitId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"groupId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"accountingCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"salesPrice":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"purchasePrice":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"weightKg":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"netWeightKg":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"cnCode":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"originCountryCode":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"isActive":{"type":"boolean"},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]}},"barcodes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"alternativeUnits":{"type":"array","items":{"type":"object","properties":{"unitId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"factor":{"type":"string","pattern":"^\\d{1,13}(\\.\\d{1,6})?$"}},"required":["unitId","factor"]}},"kitComponents":{"type":"array","items":{"type":"object","properties":{"componentItemId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"quantity":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"}},"required":["componentItemId","quantity"]}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":50},"name":{"type":"string","minLength":1,"maxLength":300},"nameEn":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"type":{"default":"goods","type":"string","enum":["goods","service","kit"]},"unitId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"groupId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"accountingCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"salesPrice":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"purchasePrice":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"weightKg":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"netWeightKg":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"cnCode":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"originCountryCode":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"isActive":{"default":true,"type":"boolean"},"customFields":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]}},"barcodes":{"default":[],"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"alternativeUnits":{"default":[],"type":"array","items":{"type":"object","properties":{"unitId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"factor":{"type":"string","pattern":"^\\d{1,13}(\\.\\d{1,6})?$"}},"required":["unitId","factor"],"additionalProperties":false}},"kitComponents":{"default":[],"type":"array","items":{"type":"object","properties":{"componentItemId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"quantity":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"}},"required":["componentItemId","quantity"],"additionalProperties":false}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["code","name","type","unitId","isActive","customFields","barcodes","alternativeUnits","kitComponents","id","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/accounts":{"get":{"summary":"DK sąskaitų planas","tags":["DK"],"description":"Reikalinga teisė: `accounting:read`","parameters":[{"name":"limit","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":50,"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":500}},{"name":"updated_since","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"q","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":20},"name":{"type":"string","minLength":1,"maxLength":300},"nameEn":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"type":{"type":"string","enum":["asset","equity","liability","income","expense"]},"parentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"isPostable":{"default":true,"type":"boolean"},"isActive":{"default":true,"type":"boolean"},"currencyCode":{"anyOf":[{"type":"string","minLength":3,"maxLength":3},{"type":"null"}]},"tags":{"default":[],"type":"array","items":{"type":"string","maxLength":50}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["code","name","type","isPostable","isActive","tags","id","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/accounts/{id}":{"get":{"summary":"DK sąskaita","tags":["DK"],"description":"Reikalinga teisė: `accounting:read`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":20},"name":{"type":"string","minLength":1,"maxLength":300},"nameEn":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"type":{"type":"string","enum":["asset","equity","liability","income","expense"]},"parentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"isPostable":{"default":true,"type":"boolean"},"isActive":{"default":true,"type":"boolean"},"currencyCode":{"anyOf":[{"type":"string","minLength":3,"maxLength":3},{"type":"null"}]},"tags":{"default":[],"type":"array","items":{"type":"string","maxLength":50}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["code","name","type","isPostable","isActive","tags","id","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/journal-entries":{"get":{"summary":"DK žurnaliniai įrašai","tags":["DK"],"description":"Reikalinga teisė: `gl:read`","parameters":[{"name":"limit","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":50,"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":500}},{"name":"updated_since","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"q","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"number":{"type":["string","null"]},"documentDate":{"type":"string"},"journalId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"seriesId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"totalDebit":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalCredit":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"registeredAt":{"type":["string","null"]},"autoReverse":{"type":"boolean"},"reversalOfEntryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"accountCode":{"type":"string"},"accountName":{"type":"string"},"debit":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"credit":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"description":{"type":["string","null"]},"partnerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"departmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"costObjectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","accountId","debit","credit","description","partnerId","departmentId","costObjectId","projectId","responsiblePersonId"],"additionalProperties":false}}},"required":["id","number","documentDate","journalId","seriesId","description","status","currencyCode","exchangeRate","totalDebit","totalCredit","registeredAt","autoReverse","reversalOfEntryId","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}},"post":{"summary":"Sukurti (ir užregistruoti) DK įrašą","tags":["DK"],"description":"Reikalinga teisė: `gl:create`","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"documentDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"journalId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"seriesId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"currencyCode":{"default":"EUR","type":"string","minLength":3,"maxLength":3},"exchangeRate":{"default":"1","type":"string","pattern":"^\\d{1,13}(\\.\\d{1,6})?$"},"lines":{"minItems":1,"maxItems":5000,"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"debit":{"default":"0","type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"credit":{"default":"0","type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"partnerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"departmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"costObjectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["accountId"]}},"autoReverse":{"type":"boolean"},"register":{"type":"boolean"}},"required":["documentDate","lines"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"number":{"type":["string","null"]},"documentDate":{"type":"string"},"journalId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"seriesId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"totalDebit":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalCredit":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"registeredAt":{"type":["string","null"]},"autoReverse":{"type":"boolean"},"reversalOfEntryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"accountCode":{"type":"string"},"accountName":{"type":"string"},"debit":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"credit":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"description":{"type":["string","null"]},"partnerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"departmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"costObjectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","accountId","debit","credit","description","partnerId","departmentId","costObjectId","projectId","responsiblePersonId"],"additionalProperties":false}}},"required":["id","number","documentDate","journalId","seriesId","description","status","currencyCode","exchangeRate","totalDebit","totalCredit","registeredAt","autoReverse","reversalOfEntryId","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/journal-entries/{id}":{"get":{"summary":"DK žurnalinis įrašas","tags":["DK"],"description":"Reikalinga teisė: `gl:read`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"number":{"type":["string","null"]},"documentDate":{"type":"string"},"journalId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"seriesId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"totalDebit":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalCredit":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"registeredAt":{"type":["string","null"]},"autoReverse":{"type":"boolean"},"reversalOfEntryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"accountCode":{"type":"string"},"accountName":{"type":"string"},"debit":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"credit":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"description":{"type":["string","null"]},"partnerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"departmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"costObjectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","accountId","debit","credit","description","partnerId","departmentId","costObjectId","projectId","responsiblePersonId"],"additionalProperties":false}}},"required":["id","number","documentDate","journalId","seriesId","description","status","currencyCode","exchangeRate","totalDebit","totalCredit","registeredAt","autoReverse","reversalOfEntryId","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/journal-entries/{id}/register":{"post":{"summary":"Užregistruoti DK įrašą","tags":["DK"],"description":"Reikalinga teisė: `gl:register`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"number":{"type":["string","null"]},"documentDate":{"type":"string"},"journalId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"seriesId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"totalDebit":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalCredit":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"registeredAt":{"type":["string","null"]},"autoReverse":{"type":"boolean"},"reversalOfEntryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"accountCode":{"type":"string"},"accountName":{"type":"string"},"debit":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"credit":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"description":{"type":["string","null"]},"partnerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"departmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"costObjectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","accountId","debit","credit","description","partnerId","departmentId","costObjectId","projectId","responsiblePersonId"],"additionalProperties":false}}},"required":["id","number","documentDate","journalId","seriesId","description","status","currencyCode","exchangeRate","totalDebit","totalCredit","registeredAt","autoReverse","reversalOfEntryId","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/journal-entries/{id}/unregister":{"post":{"summary":"Atregistruoti DK įrašą","tags":["DK"],"description":"Reikalinga teisė: `gl:register`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"number":{"type":["string","null"]},"documentDate":{"type":"string"},"journalId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"seriesId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"totalDebit":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalCredit":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"registeredAt":{"type":["string","null"]},"autoReverse":{"type":"boolean"},"reversalOfEntryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"accountCode":{"type":"string"},"accountName":{"type":"string"},"debit":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"credit":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"description":{"type":["string","null"]},"partnerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"departmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"costObjectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","accountId","debit","credit","description","partnerId","departmentId","costObjectId","projectId","responsiblePersonId"],"additionalProperties":false}}},"required":["id","number","documentDate","journalId","seriesId","description","status","currencyCode","exchangeRate","totalDebit","totalCredit","registeredAt","autoReverse","reversalOfEntryId","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/stock":{"get":{"summary":"Atsargų likučiai (sinchronizacijai: updated_since)","tags":["Atsargos"],"description":"Reikalinga teisė: `inventory:read`","parameters":[{"name":"limit","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":100,"type":"integer","minimum":1,"maximum":1000}},{"name":"cursor","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":500}},{"name":"updated_since","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"warehouseId","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"itemCode":{"type":"string"},"warehouseId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"quantity":{"type":"string"},"reservedQuantity":{"type":"string"},"freeQuantity":{"type":"string"},"costAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"updatedAt":{"type":"string"}},"required":["itemId","itemCode","warehouseId","quantity","reservedQuantity","freeQuantity","costAmount","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/inventory-movements":{"get":{"summary":"Atsargų judėjimai (registras)","tags":["Atsargos"],"description":"Reikalinga teisė: `inventory:read`","parameters":[{"name":"limit","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":100,"type":"integer","minimum":1,"maximum":1000}},{"name":"cursor","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":500}},{"name":"itemId","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"warehouseId","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"from","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"entryDate":{"type":"string"},"documentType":{"type":"string"},"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentNumber":{"type":["string","null"]},"itemId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"warehouseId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"quantity":{"type":"string"},"costAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"lot":{"type":["string","null"]},"serialNumber":{"type":["string","null"]},"reversalOf":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","entryDate","documentType","documentId","documentNumber","itemId","warehouseId","quantity","costAmount","lot","serialNumber","reversalOf"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/stock-adjustments":{"get":{"summary":"Atsargų tikslinimų sąrašas","tags":["Atsargos"],"description":"Reikalinga teisė: `inventory:read`","parameters":[{"name":"limit","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":50,"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":500}},{"name":"updated_since","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"status","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["draft","registered","cancelled"]}},{"name":"from","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"warehouseId","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"q","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentType":{"type":"string","enum":["stock_adjustment","stocktake","stock_transfer","kit_assembly","cost_allocation","inventory_cost_correction"]},"number":{"type":["string","null"]},"documentDate":{"type":"string"},"status":{"type":"string","enum":["draft","registered","cancelled"]},"warehouseId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"targetWarehouseId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"operation":{"type":["string","null"]},"reasonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"receiptStatus":{"anyOf":[{"type":"string","enum":["pending","received"]},{"type":"null"}]},"receiptDate":{"type":["string","null"]},"totalCost":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"shortageCost":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"surplusCost":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netDifference":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"description":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"itemCode":{"type":"string"},"itemName":{"type":"string"},"quantity":{"type":"string"},"bookQuantity":{"type":["string","null"]},"countedQuantity":{"type":["string","null"]},"unitCost":{"type":["string","null"]},"costAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"lot":{"type":["string","null"]},"serialNumber":{"type":["string","null"]},"expiryDate":{"type":["string","null"]},"costLayerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"allocatedAmount":{"type":["string","null"]},"description":{"type":["string","null"]}},"required":["id","lineNo","itemId","quantity","bookQuantity","countedQuantity","unitCost","costAmount","lot","serialNumber","expiryDate","costLayerId","allocatedAmount","description"],"additionalProperties":false}}},"required":["id","documentType","number","documentDate","status","warehouseId","targetWarehouseId","operation","reasonId","receiptStatus","receiptDate","totalCost","description","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}},"post":{"summary":"Sukurti atsargų tikslinimą (nurašymas / pajamavimas be pirkimo)","tags":["Atsargos"],"description":"Reikalinga teisė: `inventory:create`","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"documentDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"seriesId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"warehouseId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"costObjectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"register":{"type":"boolean"},"operation":{"type":"string","enum":["in","out"]},"reasonId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lines":{"minItems":1,"maxItems":5000,"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"quantity":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},"countedQuantity":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"unitCost":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"lot":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"serialNumber":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"expiryDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"costLayerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["itemId","quantity"]}}},"required":["documentDate","operation","reasonId","lines"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentType":{"type":"string","enum":["stock_adjustment","stocktake","stock_transfer","kit_assembly","cost_allocation","inventory_cost_correction"]},"number":{"type":["string","null"]},"documentDate":{"type":"string"},"status":{"type":"string","enum":["draft","registered","cancelled"]},"warehouseId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"targetWarehouseId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"operation":{"type":["string","null"]},"reasonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"receiptStatus":{"anyOf":[{"type":"string","enum":["pending","received"]},{"type":"null"}]},"receiptDate":{"type":["string","null"]},"totalCost":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"shortageCost":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"surplusCost":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netDifference":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"description":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"itemCode":{"type":"string"},"itemName":{"type":"string"},"quantity":{"type":"string"},"bookQuantity":{"type":["string","null"]},"countedQuantity":{"type":["string","null"]},"unitCost":{"type":["string","null"]},"costAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"lot":{"type":["string","null"]},"serialNumber":{"type":["string","null"]},"expiryDate":{"type":["string","null"]},"costLayerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"allocatedAmount":{"type":["string","null"]},"description":{"type":["string","null"]}},"required":["id","lineNo","itemId","quantity","bookQuantity","countedQuantity","unitCost","costAmount","lot","serialNumber","expiryDate","costLayerId","allocatedAmount","description"],"additionalProperties":false}}},"required":["id","documentType","number","documentDate","status","warehouseId","targetWarehouseId","operation","reasonId","receiptStatus","receiptDate","totalCost","description","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/stock-adjustments/{id}":{"get":{"summary":"Atsargų tikslinimas","tags":["Atsargos"],"description":"Reikalinga teisė: `inventory:read`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentType":{"type":"string","enum":["stock_adjustment","stocktake","stock_transfer","kit_assembly","cost_allocation","inventory_cost_correction"]},"number":{"type":["string","null"]},"documentDate":{"type":"string"},"status":{"type":"string","enum":["draft","registered","cancelled"]},"warehouseId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"targetWarehouseId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"operation":{"type":["string","null"]},"reasonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"receiptStatus":{"anyOf":[{"type":"string","enum":["pending","received"]},{"type":"null"}]},"receiptDate":{"type":["string","null"]},"totalCost":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"shortageCost":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"surplusCost":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netDifference":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"description":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"itemCode":{"type":"string"},"itemName":{"type":"string"},"quantity":{"type":"string"},"bookQuantity":{"type":["string","null"]},"countedQuantity":{"type":["string","null"]},"unitCost":{"type":["string","null"]},"costAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"lot":{"type":["string","null"]},"serialNumber":{"type":["string","null"]},"expiryDate":{"type":["string","null"]},"costLayerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"allocatedAmount":{"type":["string","null"]},"description":{"type":["string","null"]}},"required":["id","lineNo","itemId","quantity","bookQuantity","countedQuantity","unitCost","costAmount","lot","serialNumber","expiryDate","costLayerId","allocatedAmount","description"],"additionalProperties":false}}},"required":["id","documentType","number","documentDate","status","warehouseId","targetWarehouseId","operation","reasonId","receiptStatus","receiptDate","totalCost","description","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/sales-orders":{"get":{"summary":"Pardavimo užsakymai – sąrašas","tags":["Pardavimai"],"description":"Reikalinga teisė: `sales:read`","parameters":[{"name":"limit","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":50,"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":500}},{"name":"updated_since","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"status","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["draft","registered","cancelled"]}},{"name":"partnerId","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"from","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"sendStatus","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["not_sent","queued","sent","failed"]}},{"name":"q","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["sales","purchase"]},"kind":{"type":"string","enum":["order","proforma","invoice","credit_note","debit_note"]},"documentType":{"type":"string"},"number":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"documentDate":{"type":"string"},"dueDate":{"type":["string","null"]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerName":{"type":"string"},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"pricesIncludeVat":{"type":"boolean"},"totalNet":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVat":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGross":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalNetBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVatBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGrossBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"sendStatus":{"type":"string"},"fulfillmentStatus":{"type":["string","null"]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"registeredAt":{"type":["string","null"]},"isImported":{"type":"boolean"},"deliveryCountryCode":{"type":["string","null"]},"ossCountryCode":{"type":["string","null"]},"ossWarnings":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"unitCode":{"type":["string","null"]},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"discountPercent":{"type":"string"},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCode":{"type":["string","null"]},"vatRate":{"type":"string"},"reverseCharge":{"type":"boolean"},"netAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"grossAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"fulfilledQuantity":{"type":"string"},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","itemId","description","unitCode","quantity","unitPrice","discountPercent","taxCodeId","vatRate","reverseCharge","netAmount","vatAmount","grossAmount","netAmountBase","vatAmountBase","fulfilledQuantity"],"additionalProperties":false}},"paymentSchedule":{"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"],"additionalProperties":false}}},"required":["id","direction","kind","documentType","number","status","documentDate","dueDate","partnerId","partnerName","currencyCode","exchangeRate","pricesIncludeVat","totalNet","totalVat","totalGross","totalNetBase","totalVatBase","totalGrossBase","sendStatus","fulfillmentStatus","originalDocumentId","sourceDocumentId","registeredAt","isImported","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}},"post":{"summary":"Sukurti: pardavimo užsakymai (su \"register\": true – sukurti ir užregistruoti vienu kvietimu)","tags":["Pardavimai"],"description":"Reikalinga teisė: `sales:create`","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"documentDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"operationDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"dueDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"seriesId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"currencyCode":{"default":"EUR","type":"string","minLength":3,"maxLength":3},"exchangeRate":{"anyOf":[{"type":"string","pattern":"^\\d{1,13}(\\.\\d{1,6})?$"},{"type":"null"}]},"pricesIncludeVat":{"default":false,"type":"boolean"},"discountPercent":{"default":"0","type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},"taxCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"contractId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"priceCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"language":{"default":"lt","type":"string","enum":["lt","en"]},"printTemplate":{"default":"standard","type":"string","enum":["standard","compact"]},"supplierInvoiceNumber":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"supplierInvoiceDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"customsDeclarationNumber":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"deliveryCountryCode":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"warehouseId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"journalId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"paymentSchedule":{"anyOf":[{"maxItems":60,"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"]}},{"type":"null"}]},"lines":{"minItems":1,"maxItems":5000,"type":"array","items":{"type":"object","properties":{"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"quantity":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},"unitPrice":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"discountPercent":{"default":"0","type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},"taxClassId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"vatDeductible":{"default":true,"type":"boolean"},"vatDeduction":{"anyOf":[{"type":"string","enum":["direct","proportional"]},{"type":"null"}]},"vatOnly":{"default":false,"type":"boolean"},"vatAmount":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},{"type":"null"}]},"isAdditionalCost":{"default":false,"type":"boolean"},"warehouseId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"lot":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"sourceLineId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"departmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"costObjectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["quantity"]}},"register":{"type":"boolean"},"departmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"costObjectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"kind":{"type":"string","enum":["invoice","credit_note","debit_note","order"]}},"required":["documentDate","partnerId","lines"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["sales","purchase"]},"kind":{"type":"string","enum":["order","proforma","invoice","credit_note","debit_note"]},"documentType":{"type":"string"},"number":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"documentDate":{"type":"string"},"dueDate":{"type":["string","null"]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerName":{"type":"string"},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"pricesIncludeVat":{"type":"boolean"},"totalNet":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVat":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGross":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalNetBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVatBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGrossBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"sendStatus":{"type":"string"},"fulfillmentStatus":{"type":["string","null"]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"registeredAt":{"type":["string","null"]},"isImported":{"type":"boolean"},"deliveryCountryCode":{"type":["string","null"]},"ossCountryCode":{"type":["string","null"]},"ossWarnings":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"unitCode":{"type":["string","null"]},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"discountPercent":{"type":"string"},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCode":{"type":["string","null"]},"vatRate":{"type":"string"},"reverseCharge":{"type":"boolean"},"netAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"grossAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"fulfilledQuantity":{"type":"string"},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","itemId","description","unitCode","quantity","unitPrice","discountPercent","taxCodeId","vatRate","reverseCharge","netAmount","vatAmount","grossAmount","netAmountBase","vatAmountBase","fulfilledQuantity"],"additionalProperties":false}},"paymentSchedule":{"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"],"additionalProperties":false}}},"required":["id","direction","kind","documentType","number","status","documentDate","dueDate","partnerId","partnerName","currencyCode","exchangeRate","pricesIncludeVat","totalNet","totalVat","totalGross","totalNetBase","totalVatBase","totalGrossBase","sendStatus","fulfillmentStatus","originalDocumentId","sourceDocumentId","registeredAt","isImported","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/sales-orders/{id}":{"get":{"summary":"Pardavimo užsakymai – dokumentas su eilutėmis","tags":["Pardavimai"],"description":"Reikalinga teisė: `sales:read`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["sales","purchase"]},"kind":{"type":"string","enum":["order","proforma","invoice","credit_note","debit_note"]},"documentType":{"type":"string"},"number":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"documentDate":{"type":"string"},"dueDate":{"type":["string","null"]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerName":{"type":"string"},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"pricesIncludeVat":{"type":"boolean"},"totalNet":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVat":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGross":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalNetBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVatBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGrossBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"sendStatus":{"type":"string"},"fulfillmentStatus":{"type":["string","null"]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"registeredAt":{"type":["string","null"]},"isImported":{"type":"boolean"},"deliveryCountryCode":{"type":["string","null"]},"ossCountryCode":{"type":["string","null"]},"ossWarnings":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"unitCode":{"type":["string","null"]},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"discountPercent":{"type":"string"},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCode":{"type":["string","null"]},"vatRate":{"type":"string"},"reverseCharge":{"type":"boolean"},"netAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"grossAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"fulfilledQuantity":{"type":"string"},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","itemId","description","unitCode","quantity","unitPrice","discountPercent","taxCodeId","vatRate","reverseCharge","netAmount","vatAmount","grossAmount","netAmountBase","vatAmountBase","fulfilledQuantity"],"additionalProperties":false}},"paymentSchedule":{"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"],"additionalProperties":false}}},"required":["id","direction","kind","documentType","number","status","documentDate","dueDate","partnerId","partnerName","currencyCode","exchangeRate","pricesIncludeVat","totalNet","totalVat","totalGross","totalNetBase","totalVatBase","totalGrossBase","sendStatus","fulfillmentStatus","originalDocumentId","sourceDocumentId","registeredAt","isImported","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/sales-orders/{id}/register":{"post":{"summary":"Užregistruoti / patvirtinti","tags":["Pardavimai"],"description":"Reikalinga teisė: `sales:register`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["sales","purchase"]},"kind":{"type":"string","enum":["order","proforma","invoice","credit_note","debit_note"]},"documentType":{"type":"string"},"number":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"documentDate":{"type":"string"},"dueDate":{"type":["string","null"]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerName":{"type":"string"},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"pricesIncludeVat":{"type":"boolean"},"totalNet":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVat":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGross":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalNetBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVatBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGrossBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"sendStatus":{"type":"string"},"fulfillmentStatus":{"type":["string","null"]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"registeredAt":{"type":["string","null"]},"isImported":{"type":"boolean"},"deliveryCountryCode":{"type":["string","null"]},"ossCountryCode":{"type":["string","null"]},"ossWarnings":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"unitCode":{"type":["string","null"]},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"discountPercent":{"type":"string"},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCode":{"type":["string","null"]},"vatRate":{"type":"string"},"reverseCharge":{"type":"boolean"},"netAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"grossAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"fulfilledQuantity":{"type":"string"},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","itemId","description","unitCode","quantity","unitPrice","discountPercent","taxCodeId","vatRate","reverseCharge","netAmount","vatAmount","grossAmount","netAmountBase","vatAmountBase","fulfilledQuantity"],"additionalProperties":false}},"paymentSchedule":{"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"],"additionalProperties":false}}},"required":["id","direction","kind","documentType","number","status","documentDate","dueDate","partnerId","partnerName","currencyCode","exchangeRate","pricesIncludeVat","totalNet","totalVat","totalGross","totalNetBase","totalVatBase","totalGrossBase","sendStatus","fulfillmentStatus","originalDocumentId","sourceDocumentId","registeredAt","isImported","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/sales-orders/{id}/unregister":{"post":{"summary":"Atregistruoti","tags":["Pardavimai"],"description":"Reikalinga teisė: `sales:register`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["sales","purchase"]},"kind":{"type":"string","enum":["order","proforma","invoice","credit_note","debit_note"]},"documentType":{"type":"string"},"number":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"documentDate":{"type":"string"},"dueDate":{"type":["string","null"]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerName":{"type":"string"},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"pricesIncludeVat":{"type":"boolean"},"totalNet":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVat":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGross":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalNetBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVatBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGrossBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"sendStatus":{"type":"string"},"fulfillmentStatus":{"type":["string","null"]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"registeredAt":{"type":["string","null"]},"isImported":{"type":"boolean"},"deliveryCountryCode":{"type":["string","null"]},"ossCountryCode":{"type":["string","null"]},"ossWarnings":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"unitCode":{"type":["string","null"]},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"discountPercent":{"type":"string"},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCode":{"type":["string","null"]},"vatRate":{"type":"string"},"reverseCharge":{"type":"boolean"},"netAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"grossAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"fulfilledQuantity":{"type":"string"},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","itemId","description","unitCode","quantity","unitPrice","discountPercent","taxCodeId","vatRate","reverseCharge","netAmount","vatAmount","grossAmount","netAmountBase","vatAmountBase","fulfilledQuantity"],"additionalProperties":false}},"paymentSchedule":{"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"],"additionalProperties":false}}},"required":["id","direction","kind","documentType","number","status","documentDate","dueDate","partnerId","partnerName","currencyCode","exchangeRate","pricesIncludeVat","totalNet","totalVat","totalGross","totalNetBase","totalVatBase","totalGrossBase","sendStatus","fulfillmentStatus","originalDocumentId","sourceDocumentId","registeredAt","isImported","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/sales-orders/{id}/send":{"post":{"summary":"Išsiųsti PDF el. paštu","tags":["Pardavimai"],"description":"Reikalinga teisė: `sales:update`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"to":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"message":{"type":"string","maxLength":5000}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["sales","purchase"]},"kind":{"type":"string","enum":["order","proforma","invoice","credit_note","debit_note"]},"documentType":{"type":"string"},"number":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"documentDate":{"type":"string"},"dueDate":{"type":["string","null"]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerName":{"type":"string"},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"pricesIncludeVat":{"type":"boolean"},"totalNet":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVat":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGross":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalNetBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVatBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGrossBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"sendStatus":{"type":"string"},"fulfillmentStatus":{"type":["string","null"]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"registeredAt":{"type":["string","null"]},"isImported":{"type":"boolean"},"deliveryCountryCode":{"type":["string","null"]},"ossCountryCode":{"type":["string","null"]},"ossWarnings":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"unitCode":{"type":["string","null"]},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"discountPercent":{"type":"string"},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCode":{"type":["string","null"]},"vatRate":{"type":"string"},"reverseCharge":{"type":"boolean"},"netAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"grossAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"fulfilledQuantity":{"type":"string"},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","itemId","description","unitCode","quantity","unitPrice","discountPercent","taxCodeId","vatRate","reverseCharge","netAmount","vatAmount","grossAmount","netAmountBase","vatAmountBase","fulfilledQuantity"],"additionalProperties":false}},"paymentSchedule":{"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"],"additionalProperties":false}}},"required":["id","direction","kind","documentType","number","status","documentDate","dueDate","partnerId","partnerName","currencyCode","exchangeRate","pricesIncludeVat","totalNet","totalVat","totalGross","totalNetBase","totalVatBase","totalGrossBase","sendStatus","fulfillmentStatus","originalDocumentId","sourceDocumentId","registeredAt","isImported","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/sales-orders/{id}/pdf":{"get":{"summary":"Atsisiųsti PDF","tags":["Pardavimai"],"description":"Reikalinga teisė: `sales:read`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/sales-invoices":{"get":{"summary":"Pardavimo sąskaitos – sąrašas","tags":["Pardavimai"],"description":"Reikalinga teisė: `sales:read`","parameters":[{"name":"limit","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":50,"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":500}},{"name":"updated_since","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"status","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["draft","registered","cancelled"]}},{"name":"partnerId","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"from","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"sendStatus","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["not_sent","queued","sent","failed"]}},{"name":"q","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["sales","purchase"]},"kind":{"type":"string","enum":["order","proforma","invoice","credit_note","debit_note"]},"documentType":{"type":"string"},"number":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"documentDate":{"type":"string"},"dueDate":{"type":["string","null"]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerName":{"type":"string"},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"pricesIncludeVat":{"type":"boolean"},"totalNet":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVat":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGross":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalNetBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVatBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGrossBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"sendStatus":{"type":"string"},"fulfillmentStatus":{"type":["string","null"]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"registeredAt":{"type":["string","null"]},"isImported":{"type":"boolean"},"deliveryCountryCode":{"type":["string","null"]},"ossCountryCode":{"type":["string","null"]},"ossWarnings":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"unitCode":{"type":["string","null"]},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"discountPercent":{"type":"string"},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCode":{"type":["string","null"]},"vatRate":{"type":"string"},"reverseCharge":{"type":"boolean"},"netAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"grossAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"fulfilledQuantity":{"type":"string"},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","itemId","description","unitCode","quantity","unitPrice","discountPercent","taxCodeId","vatRate","reverseCharge","netAmount","vatAmount","grossAmount","netAmountBase","vatAmountBase","fulfilledQuantity"],"additionalProperties":false}},"paymentSchedule":{"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"],"additionalProperties":false}}},"required":["id","direction","kind","documentType","number","status","documentDate","dueDate","partnerId","partnerName","currencyCode","exchangeRate","pricesIncludeVat","totalNet","totalVat","totalGross","totalNetBase","totalVatBase","totalGrossBase","sendStatus","fulfillmentStatus","originalDocumentId","sourceDocumentId","registeredAt","isImported","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}},"post":{"summary":"Sukurti: pardavimo sąskaitos (su \"register\": true – sukurti ir užregistruoti vienu kvietimu)","tags":["Pardavimai"],"description":"Reikalinga teisė: `sales:create`","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"documentDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"operationDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"dueDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"seriesId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"currencyCode":{"default":"EUR","type":"string","minLength":3,"maxLength":3},"exchangeRate":{"anyOf":[{"type":"string","pattern":"^\\d{1,13}(\\.\\d{1,6})?$"},{"type":"null"}]},"pricesIncludeVat":{"default":false,"type":"boolean"},"discountPercent":{"default":"0","type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},"taxCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"contractId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"priceCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"language":{"default":"lt","type":"string","enum":["lt","en"]},"printTemplate":{"default":"standard","type":"string","enum":["standard","compact"]},"supplierInvoiceNumber":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"supplierInvoiceDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"customsDeclarationNumber":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"deliveryCountryCode":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"warehouseId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"journalId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"paymentSchedule":{"anyOf":[{"maxItems":60,"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"]}},{"type":"null"}]},"lines":{"minItems":1,"maxItems":5000,"type":"array","items":{"type":"object","properties":{"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"quantity":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},"unitPrice":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"discountPercent":{"default":"0","type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},"taxClassId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"vatDeductible":{"default":true,"type":"boolean"},"vatDeduction":{"anyOf":[{"type":"string","enum":["direct","proportional"]},{"type":"null"}]},"vatOnly":{"default":false,"type":"boolean"},"vatAmount":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},{"type":"null"}]},"isAdditionalCost":{"default":false,"type":"boolean"},"warehouseId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"lot":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"sourceLineId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"departmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"costObjectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["quantity"]}},"register":{"type":"boolean"},"departmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"costObjectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"kind":{"type":"string","enum":["invoice","credit_note","debit_note","order"]}},"required":["documentDate","partnerId","lines"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["sales","purchase"]},"kind":{"type":"string","enum":["order","proforma","invoice","credit_note","debit_note"]},"documentType":{"type":"string"},"number":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"documentDate":{"type":"string"},"dueDate":{"type":["string","null"]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerName":{"type":"string"},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"pricesIncludeVat":{"type":"boolean"},"totalNet":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVat":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGross":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalNetBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVatBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGrossBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"sendStatus":{"type":"string"},"fulfillmentStatus":{"type":["string","null"]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"registeredAt":{"type":["string","null"]},"isImported":{"type":"boolean"},"deliveryCountryCode":{"type":["string","null"]},"ossCountryCode":{"type":["string","null"]},"ossWarnings":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"unitCode":{"type":["string","null"]},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"discountPercent":{"type":"string"},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCode":{"type":["string","null"]},"vatRate":{"type":"string"},"reverseCharge":{"type":"boolean"},"netAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"grossAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"fulfilledQuantity":{"type":"string"},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","itemId","description","unitCode","quantity","unitPrice","discountPercent","taxCodeId","vatRate","reverseCharge","netAmount","vatAmount","grossAmount","netAmountBase","vatAmountBase","fulfilledQuantity"],"additionalProperties":false}},"paymentSchedule":{"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"],"additionalProperties":false}}},"required":["id","direction","kind","documentType","number","status","documentDate","dueDate","partnerId","partnerName","currencyCode","exchangeRate","pricesIncludeVat","totalNet","totalVat","totalGross","totalNetBase","totalVatBase","totalGrossBase","sendStatus","fulfillmentStatus","originalDocumentId","sourceDocumentId","registeredAt","isImported","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/sales-invoices/{id}":{"get":{"summary":"Pardavimo sąskaitos – dokumentas su eilutėmis","tags":["Pardavimai"],"description":"Reikalinga teisė: `sales:read`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["sales","purchase"]},"kind":{"type":"string","enum":["order","proforma","invoice","credit_note","debit_note"]},"documentType":{"type":"string"},"number":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"documentDate":{"type":"string"},"dueDate":{"type":["string","null"]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerName":{"type":"string"},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"pricesIncludeVat":{"type":"boolean"},"totalNet":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVat":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGross":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalNetBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVatBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGrossBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"sendStatus":{"type":"string"},"fulfillmentStatus":{"type":["string","null"]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"registeredAt":{"type":["string","null"]},"isImported":{"type":"boolean"},"deliveryCountryCode":{"type":["string","null"]},"ossCountryCode":{"type":["string","null"]},"ossWarnings":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"unitCode":{"type":["string","null"]},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"discountPercent":{"type":"string"},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCode":{"type":["string","null"]},"vatRate":{"type":"string"},"reverseCharge":{"type":"boolean"},"netAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"grossAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"fulfilledQuantity":{"type":"string"},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","itemId","description","unitCode","quantity","unitPrice","discountPercent","taxCodeId","vatRate","reverseCharge","netAmount","vatAmount","grossAmount","netAmountBase","vatAmountBase","fulfilledQuantity"],"additionalProperties":false}},"paymentSchedule":{"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"],"additionalProperties":false}}},"required":["id","direction","kind","documentType","number","status","documentDate","dueDate","partnerId","partnerName","currencyCode","exchangeRate","pricesIncludeVat","totalNet","totalVat","totalGross","totalNetBase","totalVatBase","totalGrossBase","sendStatus","fulfillmentStatus","originalDocumentId","sourceDocumentId","registeredAt","isImported","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/sales-invoices/{id}/register":{"post":{"summary":"Užregistruoti / patvirtinti","tags":["Pardavimai"],"description":"Reikalinga teisė: `sales:register`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["sales","purchase"]},"kind":{"type":"string","enum":["order","proforma","invoice","credit_note","debit_note"]},"documentType":{"type":"string"},"number":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"documentDate":{"type":"string"},"dueDate":{"type":["string","null"]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerName":{"type":"string"},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"pricesIncludeVat":{"type":"boolean"},"totalNet":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVat":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGross":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalNetBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVatBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGrossBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"sendStatus":{"type":"string"},"fulfillmentStatus":{"type":["string","null"]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"registeredAt":{"type":["string","null"]},"isImported":{"type":"boolean"},"deliveryCountryCode":{"type":["string","null"]},"ossCountryCode":{"type":["string","null"]},"ossWarnings":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"unitCode":{"type":["string","null"]},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"discountPercent":{"type":"string"},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCode":{"type":["string","null"]},"vatRate":{"type":"string"},"reverseCharge":{"type":"boolean"},"netAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"grossAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"fulfilledQuantity":{"type":"string"},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","itemId","description","unitCode","quantity","unitPrice","discountPercent","taxCodeId","vatRate","reverseCharge","netAmount","vatAmount","grossAmount","netAmountBase","vatAmountBase","fulfilledQuantity"],"additionalProperties":false}},"paymentSchedule":{"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"],"additionalProperties":false}}},"required":["id","direction","kind","documentType","number","status","documentDate","dueDate","partnerId","partnerName","currencyCode","exchangeRate","pricesIncludeVat","totalNet","totalVat","totalGross","totalNetBase","totalVatBase","totalGrossBase","sendStatus","fulfillmentStatus","originalDocumentId","sourceDocumentId","registeredAt","isImported","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/sales-invoices/{id}/unregister":{"post":{"summary":"Atregistruoti","tags":["Pardavimai"],"description":"Reikalinga teisė: `sales:register`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["sales","purchase"]},"kind":{"type":"string","enum":["order","proforma","invoice","credit_note","debit_note"]},"documentType":{"type":"string"},"number":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"documentDate":{"type":"string"},"dueDate":{"type":["string","null"]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerName":{"type":"string"},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"pricesIncludeVat":{"type":"boolean"},"totalNet":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVat":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGross":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalNetBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVatBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGrossBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"sendStatus":{"type":"string"},"fulfillmentStatus":{"type":["string","null"]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"registeredAt":{"type":["string","null"]},"isImported":{"type":"boolean"},"deliveryCountryCode":{"type":["string","null"]},"ossCountryCode":{"type":["string","null"]},"ossWarnings":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"unitCode":{"type":["string","null"]},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"discountPercent":{"type":"string"},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCode":{"type":["string","null"]},"vatRate":{"type":"string"},"reverseCharge":{"type":"boolean"},"netAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"grossAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"fulfilledQuantity":{"type":"string"},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","itemId","description","unitCode","quantity","unitPrice","discountPercent","taxCodeId","vatRate","reverseCharge","netAmount","vatAmount","grossAmount","netAmountBase","vatAmountBase","fulfilledQuantity"],"additionalProperties":false}},"paymentSchedule":{"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"],"additionalProperties":false}}},"required":["id","direction","kind","documentType","number","status","documentDate","dueDate","partnerId","partnerName","currencyCode","exchangeRate","pricesIncludeVat","totalNet","totalVat","totalGross","totalNetBase","totalVatBase","totalGrossBase","sendStatus","fulfillmentStatus","originalDocumentId","sourceDocumentId","registeredAt","isImported","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/sales-invoices/{id}/send":{"post":{"summary":"Išsiųsti PDF el. paštu","tags":["Pardavimai"],"description":"Reikalinga teisė: `sales:update`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"to":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"message":{"type":"string","maxLength":5000}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["sales","purchase"]},"kind":{"type":"string","enum":["order","proforma","invoice","credit_note","debit_note"]},"documentType":{"type":"string"},"number":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"documentDate":{"type":"string"},"dueDate":{"type":["string","null"]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerName":{"type":"string"},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"pricesIncludeVat":{"type":"boolean"},"totalNet":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVat":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGross":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalNetBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVatBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGrossBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"sendStatus":{"type":"string"},"fulfillmentStatus":{"type":["string","null"]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"registeredAt":{"type":["string","null"]},"isImported":{"type":"boolean"},"deliveryCountryCode":{"type":["string","null"]},"ossCountryCode":{"type":["string","null"]},"ossWarnings":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"unitCode":{"type":["string","null"]},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"discountPercent":{"type":"string"},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCode":{"type":["string","null"]},"vatRate":{"type":"string"},"reverseCharge":{"type":"boolean"},"netAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"grossAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"fulfilledQuantity":{"type":"string"},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","itemId","description","unitCode","quantity","unitPrice","discountPercent","taxCodeId","vatRate","reverseCharge","netAmount","vatAmount","grossAmount","netAmountBase","vatAmountBase","fulfilledQuantity"],"additionalProperties":false}},"paymentSchedule":{"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"],"additionalProperties":false}}},"required":["id","direction","kind","documentType","number","status","documentDate","dueDate","partnerId","partnerName","currencyCode","exchangeRate","pricesIncludeVat","totalNet","totalVat","totalGross","totalNetBase","totalVatBase","totalGrossBase","sendStatus","fulfillmentStatus","originalDocumentId","sourceDocumentId","registeredAt","isImported","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/sales-invoices/{id}/pdf":{"get":{"summary":"Atsisiųsti PDF","tags":["Pardavimai"],"description":"Reikalinga teisė: `sales:read`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/purchase-orders":{"get":{"summary":"Pirkimo užsakymai – sąrašas","tags":["Pirkimai"],"description":"Reikalinga teisė: `purchases:read`","parameters":[{"name":"limit","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":50,"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":500}},{"name":"updated_since","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"status","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["draft","registered","cancelled"]}},{"name":"partnerId","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"from","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"sendStatus","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["not_sent","queued","sent","failed"]}},{"name":"q","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["sales","purchase"]},"kind":{"type":"string","enum":["order","proforma","invoice","credit_note","debit_note"]},"documentType":{"type":"string"},"number":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"documentDate":{"type":"string"},"dueDate":{"type":["string","null"]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerName":{"type":"string"},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"pricesIncludeVat":{"type":"boolean"},"totalNet":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVat":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGross":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalNetBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVatBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGrossBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"sendStatus":{"type":"string"},"fulfillmentStatus":{"type":["string","null"]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"registeredAt":{"type":["string","null"]},"isImported":{"type":"boolean"},"deliveryCountryCode":{"type":["string","null"]},"ossCountryCode":{"type":["string","null"]},"ossWarnings":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"unitCode":{"type":["string","null"]},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"discountPercent":{"type":"string"},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCode":{"type":["string","null"]},"vatRate":{"type":"string"},"reverseCharge":{"type":"boolean"},"netAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"grossAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"fulfilledQuantity":{"type":"string"},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","itemId","description","unitCode","quantity","unitPrice","discountPercent","taxCodeId","vatRate","reverseCharge","netAmount","vatAmount","grossAmount","netAmountBase","vatAmountBase","fulfilledQuantity"],"additionalProperties":false}},"paymentSchedule":{"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"],"additionalProperties":false}}},"required":["id","direction","kind","documentType","number","status","documentDate","dueDate","partnerId","partnerName","currencyCode","exchangeRate","pricesIncludeVat","totalNet","totalVat","totalGross","totalNetBase","totalVatBase","totalGrossBase","sendStatus","fulfillmentStatus","originalDocumentId","sourceDocumentId","registeredAt","isImported","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}},"post":{"summary":"Sukurti: pirkimo užsakymai (su \"register\": true – sukurti ir užregistruoti vienu kvietimu)","tags":["Pirkimai"],"description":"Reikalinga teisė: `purchases:create`","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"documentDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"operationDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"dueDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"seriesId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"currencyCode":{"default":"EUR","type":"string","minLength":3,"maxLength":3},"exchangeRate":{"anyOf":[{"type":"string","pattern":"^\\d{1,13}(\\.\\d{1,6})?$"},{"type":"null"}]},"pricesIncludeVat":{"default":false,"type":"boolean"},"discountPercent":{"default":"0","type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},"taxCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"contractId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"priceCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"language":{"default":"lt","type":"string","enum":["lt","en"]},"printTemplate":{"default":"standard","type":"string","enum":["standard","compact"]},"supplierInvoiceNumber":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"supplierInvoiceDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"customsDeclarationNumber":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"deliveryCountryCode":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"warehouseId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"journalId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"paymentSchedule":{"anyOf":[{"maxItems":60,"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"]}},{"type":"null"}]},"lines":{"minItems":1,"maxItems":5000,"type":"array","items":{"type":"object","properties":{"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"quantity":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},"unitPrice":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"discountPercent":{"default":"0","type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},"taxClassId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"vatDeductible":{"default":true,"type":"boolean"},"vatDeduction":{"anyOf":[{"type":"string","enum":["direct","proportional"]},{"type":"null"}]},"vatOnly":{"default":false,"type":"boolean"},"vatAmount":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},{"type":"null"}]},"isAdditionalCost":{"default":false,"type":"boolean"},"warehouseId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"lot":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"sourceLineId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"departmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"costObjectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["quantity"]}},"register":{"type":"boolean"},"departmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"costObjectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"kind":{"type":"string","enum":["invoice","credit_note","debit_note","order"]}},"required":["documentDate","partnerId","lines"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["sales","purchase"]},"kind":{"type":"string","enum":["order","proforma","invoice","credit_note","debit_note"]},"documentType":{"type":"string"},"number":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"documentDate":{"type":"string"},"dueDate":{"type":["string","null"]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerName":{"type":"string"},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"pricesIncludeVat":{"type":"boolean"},"totalNet":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVat":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGross":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalNetBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVatBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGrossBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"sendStatus":{"type":"string"},"fulfillmentStatus":{"type":["string","null"]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"registeredAt":{"type":["string","null"]},"isImported":{"type":"boolean"},"deliveryCountryCode":{"type":["string","null"]},"ossCountryCode":{"type":["string","null"]},"ossWarnings":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"unitCode":{"type":["string","null"]},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"discountPercent":{"type":"string"},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCode":{"type":["string","null"]},"vatRate":{"type":"string"},"reverseCharge":{"type":"boolean"},"netAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"grossAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"fulfilledQuantity":{"type":"string"},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","itemId","description","unitCode","quantity","unitPrice","discountPercent","taxCodeId","vatRate","reverseCharge","netAmount","vatAmount","grossAmount","netAmountBase","vatAmountBase","fulfilledQuantity"],"additionalProperties":false}},"paymentSchedule":{"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"],"additionalProperties":false}}},"required":["id","direction","kind","documentType","number","status","documentDate","dueDate","partnerId","partnerName","currencyCode","exchangeRate","pricesIncludeVat","totalNet","totalVat","totalGross","totalNetBase","totalVatBase","totalGrossBase","sendStatus","fulfillmentStatus","originalDocumentId","sourceDocumentId","registeredAt","isImported","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/purchase-orders/{id}":{"get":{"summary":"Pirkimo užsakymai – dokumentas su eilutėmis","tags":["Pirkimai"],"description":"Reikalinga teisė: `purchases:read`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["sales","purchase"]},"kind":{"type":"string","enum":["order","proforma","invoice","credit_note","debit_note"]},"documentType":{"type":"string"},"number":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"documentDate":{"type":"string"},"dueDate":{"type":["string","null"]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerName":{"type":"string"},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"pricesIncludeVat":{"type":"boolean"},"totalNet":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVat":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGross":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalNetBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVatBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGrossBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"sendStatus":{"type":"string"},"fulfillmentStatus":{"type":["string","null"]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"registeredAt":{"type":["string","null"]},"isImported":{"type":"boolean"},"deliveryCountryCode":{"type":["string","null"]},"ossCountryCode":{"type":["string","null"]},"ossWarnings":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"unitCode":{"type":["string","null"]},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"discountPercent":{"type":"string"},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCode":{"type":["string","null"]},"vatRate":{"type":"string"},"reverseCharge":{"type":"boolean"},"netAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"grossAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"fulfilledQuantity":{"type":"string"},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","itemId","description","unitCode","quantity","unitPrice","discountPercent","taxCodeId","vatRate","reverseCharge","netAmount","vatAmount","grossAmount","netAmountBase","vatAmountBase","fulfilledQuantity"],"additionalProperties":false}},"paymentSchedule":{"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"],"additionalProperties":false}}},"required":["id","direction","kind","documentType","number","status","documentDate","dueDate","partnerId","partnerName","currencyCode","exchangeRate","pricesIncludeVat","totalNet","totalVat","totalGross","totalNetBase","totalVatBase","totalGrossBase","sendStatus","fulfillmentStatus","originalDocumentId","sourceDocumentId","registeredAt","isImported","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/purchase-orders/{id}/register":{"post":{"summary":"Užregistruoti / patvirtinti","tags":["Pirkimai"],"description":"Reikalinga teisė: `purchases:register`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["sales","purchase"]},"kind":{"type":"string","enum":["order","proforma","invoice","credit_note","debit_note"]},"documentType":{"type":"string"},"number":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"documentDate":{"type":"string"},"dueDate":{"type":["string","null"]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerName":{"type":"string"},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"pricesIncludeVat":{"type":"boolean"},"totalNet":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVat":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGross":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalNetBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVatBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGrossBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"sendStatus":{"type":"string"},"fulfillmentStatus":{"type":["string","null"]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"registeredAt":{"type":["string","null"]},"isImported":{"type":"boolean"},"deliveryCountryCode":{"type":["string","null"]},"ossCountryCode":{"type":["string","null"]},"ossWarnings":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"unitCode":{"type":["string","null"]},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"discountPercent":{"type":"string"},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCode":{"type":["string","null"]},"vatRate":{"type":"string"},"reverseCharge":{"type":"boolean"},"netAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"grossAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"fulfilledQuantity":{"type":"string"},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","itemId","description","unitCode","quantity","unitPrice","discountPercent","taxCodeId","vatRate","reverseCharge","netAmount","vatAmount","grossAmount","netAmountBase","vatAmountBase","fulfilledQuantity"],"additionalProperties":false}},"paymentSchedule":{"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"],"additionalProperties":false}}},"required":["id","direction","kind","documentType","number","status","documentDate","dueDate","partnerId","partnerName","currencyCode","exchangeRate","pricesIncludeVat","totalNet","totalVat","totalGross","totalNetBase","totalVatBase","totalGrossBase","sendStatus","fulfillmentStatus","originalDocumentId","sourceDocumentId","registeredAt","isImported","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/purchase-orders/{id}/unregister":{"post":{"summary":"Atregistruoti","tags":["Pirkimai"],"description":"Reikalinga teisė: `purchases:register`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["sales","purchase"]},"kind":{"type":"string","enum":["order","proforma","invoice","credit_note","debit_note"]},"documentType":{"type":"string"},"number":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"documentDate":{"type":"string"},"dueDate":{"type":["string","null"]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerName":{"type":"string"},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"pricesIncludeVat":{"type":"boolean"},"totalNet":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVat":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGross":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalNetBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVatBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGrossBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"sendStatus":{"type":"string"},"fulfillmentStatus":{"type":["string","null"]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"registeredAt":{"type":["string","null"]},"isImported":{"type":"boolean"},"deliveryCountryCode":{"type":["string","null"]},"ossCountryCode":{"type":["string","null"]},"ossWarnings":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"unitCode":{"type":["string","null"]},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"discountPercent":{"type":"string"},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCode":{"type":["string","null"]},"vatRate":{"type":"string"},"reverseCharge":{"type":"boolean"},"netAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"grossAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"fulfilledQuantity":{"type":"string"},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","itemId","description","unitCode","quantity","unitPrice","discountPercent","taxCodeId","vatRate","reverseCharge","netAmount","vatAmount","grossAmount","netAmountBase","vatAmountBase","fulfilledQuantity"],"additionalProperties":false}},"paymentSchedule":{"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"],"additionalProperties":false}}},"required":["id","direction","kind","documentType","number","status","documentDate","dueDate","partnerId","partnerName","currencyCode","exchangeRate","pricesIncludeVat","totalNet","totalVat","totalGross","totalNetBase","totalVatBase","totalGrossBase","sendStatus","fulfillmentStatus","originalDocumentId","sourceDocumentId","registeredAt","isImported","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/purchase-orders/{id}/send":{"post":{"summary":"Išsiųsti PDF el. paštu","tags":["Pirkimai"],"description":"Reikalinga teisė: `purchases:update`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"to":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"message":{"type":"string","maxLength":5000}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["sales","purchase"]},"kind":{"type":"string","enum":["order","proforma","invoice","credit_note","debit_note"]},"documentType":{"type":"string"},"number":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"documentDate":{"type":"string"},"dueDate":{"type":["string","null"]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerName":{"type":"string"},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"pricesIncludeVat":{"type":"boolean"},"totalNet":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVat":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGross":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalNetBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVatBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGrossBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"sendStatus":{"type":"string"},"fulfillmentStatus":{"type":["string","null"]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"registeredAt":{"type":["string","null"]},"isImported":{"type":"boolean"},"deliveryCountryCode":{"type":["string","null"]},"ossCountryCode":{"type":["string","null"]},"ossWarnings":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"unitCode":{"type":["string","null"]},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"discountPercent":{"type":"string"},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCode":{"type":["string","null"]},"vatRate":{"type":"string"},"reverseCharge":{"type":"boolean"},"netAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"grossAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"fulfilledQuantity":{"type":"string"},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","itemId","description","unitCode","quantity","unitPrice","discountPercent","taxCodeId","vatRate","reverseCharge","netAmount","vatAmount","grossAmount","netAmountBase","vatAmountBase","fulfilledQuantity"],"additionalProperties":false}},"paymentSchedule":{"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"],"additionalProperties":false}}},"required":["id","direction","kind","documentType","number","status","documentDate","dueDate","partnerId","partnerName","currencyCode","exchangeRate","pricesIncludeVat","totalNet","totalVat","totalGross","totalNetBase","totalVatBase","totalGrossBase","sendStatus","fulfillmentStatus","originalDocumentId","sourceDocumentId","registeredAt","isImported","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/purchase-orders/{id}/pdf":{"get":{"summary":"Atsisiųsti PDF","tags":["Pirkimai"],"description":"Reikalinga teisė: `purchases:read`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/purchase-invoices":{"get":{"summary":"Pirkimo sąskaitos – sąrašas","tags":["Pirkimai"],"description":"Reikalinga teisė: `purchases:read`","parameters":[{"name":"limit","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":50,"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":500}},{"name":"updated_since","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"status","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["draft","registered","cancelled"]}},{"name":"partnerId","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"from","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"sendStatus","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["not_sent","queued","sent","failed"]}},{"name":"q","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["sales","purchase"]},"kind":{"type":"string","enum":["order","proforma","invoice","credit_note","debit_note"]},"documentType":{"type":"string"},"number":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"documentDate":{"type":"string"},"dueDate":{"type":["string","null"]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerName":{"type":"string"},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"pricesIncludeVat":{"type":"boolean"},"totalNet":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVat":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGross":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalNetBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVatBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGrossBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"sendStatus":{"type":"string"},"fulfillmentStatus":{"type":["string","null"]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"registeredAt":{"type":["string","null"]},"isImported":{"type":"boolean"},"deliveryCountryCode":{"type":["string","null"]},"ossCountryCode":{"type":["string","null"]},"ossWarnings":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"unitCode":{"type":["string","null"]},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"discountPercent":{"type":"string"},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCode":{"type":["string","null"]},"vatRate":{"type":"string"},"reverseCharge":{"type":"boolean"},"netAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"grossAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"fulfilledQuantity":{"type":"string"},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","itemId","description","unitCode","quantity","unitPrice","discountPercent","taxCodeId","vatRate","reverseCharge","netAmount","vatAmount","grossAmount","netAmountBase","vatAmountBase","fulfilledQuantity"],"additionalProperties":false}},"paymentSchedule":{"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"],"additionalProperties":false}}},"required":["id","direction","kind","documentType","number","status","documentDate","dueDate","partnerId","partnerName","currencyCode","exchangeRate","pricesIncludeVat","totalNet","totalVat","totalGross","totalNetBase","totalVatBase","totalGrossBase","sendStatus","fulfillmentStatus","originalDocumentId","sourceDocumentId","registeredAt","isImported","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}},"post":{"summary":"Sukurti: pirkimo sąskaitos (su \"register\": true – sukurti ir užregistruoti vienu kvietimu)","tags":["Pirkimai"],"description":"Reikalinga teisė: `purchases:create`","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"documentDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"operationDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"dueDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"seriesId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"currencyCode":{"default":"EUR","type":"string","minLength":3,"maxLength":3},"exchangeRate":{"anyOf":[{"type":"string","pattern":"^\\d{1,13}(\\.\\d{1,6})?$"},{"type":"null"}]},"pricesIncludeVat":{"default":false,"type":"boolean"},"discountPercent":{"default":"0","type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},"taxCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"contractId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"priceCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"language":{"default":"lt","type":"string","enum":["lt","en"]},"printTemplate":{"default":"standard","type":"string","enum":["standard","compact"]},"supplierInvoiceNumber":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"supplierInvoiceDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"customsDeclarationNumber":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"deliveryCountryCode":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"warehouseId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"journalId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"paymentSchedule":{"anyOf":[{"maxItems":60,"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"]}},{"type":"null"}]},"lines":{"minItems":1,"maxItems":5000,"type":"array","items":{"type":"object","properties":{"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"quantity":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},"unitPrice":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"discountPercent":{"default":"0","type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},"taxClassId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"vatDeductible":{"default":true,"type":"boolean"},"vatDeduction":{"anyOf":[{"type":"string","enum":["direct","proportional"]},{"type":"null"}]},"vatOnly":{"default":false,"type":"boolean"},"vatAmount":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},{"type":"null"}]},"isAdditionalCost":{"default":false,"type":"boolean"},"warehouseId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"lot":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"sourceLineId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"departmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"costObjectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["quantity"]}},"register":{"type":"boolean"},"departmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"costObjectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"kind":{"type":"string","enum":["invoice","credit_note","debit_note","order"]}},"required":["documentDate","partnerId","lines"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["sales","purchase"]},"kind":{"type":"string","enum":["order","proforma","invoice","credit_note","debit_note"]},"documentType":{"type":"string"},"number":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"documentDate":{"type":"string"},"dueDate":{"type":["string","null"]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerName":{"type":"string"},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"pricesIncludeVat":{"type":"boolean"},"totalNet":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVat":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGross":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalNetBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVatBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGrossBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"sendStatus":{"type":"string"},"fulfillmentStatus":{"type":["string","null"]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"registeredAt":{"type":["string","null"]},"isImported":{"type":"boolean"},"deliveryCountryCode":{"type":["string","null"]},"ossCountryCode":{"type":["string","null"]},"ossWarnings":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"unitCode":{"type":["string","null"]},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"discountPercent":{"type":"string"},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCode":{"type":["string","null"]},"vatRate":{"type":"string"},"reverseCharge":{"type":"boolean"},"netAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"grossAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"fulfilledQuantity":{"type":"string"},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","itemId","description","unitCode","quantity","unitPrice","discountPercent","taxCodeId","vatRate","reverseCharge","netAmount","vatAmount","grossAmount","netAmountBase","vatAmountBase","fulfilledQuantity"],"additionalProperties":false}},"paymentSchedule":{"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"],"additionalProperties":false}}},"required":["id","direction","kind","documentType","number","status","documentDate","dueDate","partnerId","partnerName","currencyCode","exchangeRate","pricesIncludeVat","totalNet","totalVat","totalGross","totalNetBase","totalVatBase","totalGrossBase","sendStatus","fulfillmentStatus","originalDocumentId","sourceDocumentId","registeredAt","isImported","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/purchase-invoices/{id}":{"get":{"summary":"Pirkimo sąskaitos – dokumentas su eilutėmis","tags":["Pirkimai"],"description":"Reikalinga teisė: `purchases:read`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["sales","purchase"]},"kind":{"type":"string","enum":["order","proforma","invoice","credit_note","debit_note"]},"documentType":{"type":"string"},"number":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"documentDate":{"type":"string"},"dueDate":{"type":["string","null"]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerName":{"type":"string"},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"pricesIncludeVat":{"type":"boolean"},"totalNet":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVat":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGross":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalNetBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVatBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGrossBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"sendStatus":{"type":"string"},"fulfillmentStatus":{"type":["string","null"]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"registeredAt":{"type":["string","null"]},"isImported":{"type":"boolean"},"deliveryCountryCode":{"type":["string","null"]},"ossCountryCode":{"type":["string","null"]},"ossWarnings":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"unitCode":{"type":["string","null"]},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"discountPercent":{"type":"string"},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCode":{"type":["string","null"]},"vatRate":{"type":"string"},"reverseCharge":{"type":"boolean"},"netAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"grossAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"fulfilledQuantity":{"type":"string"},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","itemId","description","unitCode","quantity","unitPrice","discountPercent","taxCodeId","vatRate","reverseCharge","netAmount","vatAmount","grossAmount","netAmountBase","vatAmountBase","fulfilledQuantity"],"additionalProperties":false}},"paymentSchedule":{"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"],"additionalProperties":false}}},"required":["id","direction","kind","documentType","number","status","documentDate","dueDate","partnerId","partnerName","currencyCode","exchangeRate","pricesIncludeVat","totalNet","totalVat","totalGross","totalNetBase","totalVatBase","totalGrossBase","sendStatus","fulfillmentStatus","originalDocumentId","sourceDocumentId","registeredAt","isImported","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/purchase-invoices/{id}/register":{"post":{"summary":"Užregistruoti / patvirtinti","tags":["Pirkimai"],"description":"Reikalinga teisė: `purchases:register`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["sales","purchase"]},"kind":{"type":"string","enum":["order","proforma","invoice","credit_note","debit_note"]},"documentType":{"type":"string"},"number":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"documentDate":{"type":"string"},"dueDate":{"type":["string","null"]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerName":{"type":"string"},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"pricesIncludeVat":{"type":"boolean"},"totalNet":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVat":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGross":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalNetBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVatBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGrossBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"sendStatus":{"type":"string"},"fulfillmentStatus":{"type":["string","null"]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"registeredAt":{"type":["string","null"]},"isImported":{"type":"boolean"},"deliveryCountryCode":{"type":["string","null"]},"ossCountryCode":{"type":["string","null"]},"ossWarnings":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"unitCode":{"type":["string","null"]},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"discountPercent":{"type":"string"},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCode":{"type":["string","null"]},"vatRate":{"type":"string"},"reverseCharge":{"type":"boolean"},"netAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"grossAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"fulfilledQuantity":{"type":"string"},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","itemId","description","unitCode","quantity","unitPrice","discountPercent","taxCodeId","vatRate","reverseCharge","netAmount","vatAmount","grossAmount","netAmountBase","vatAmountBase","fulfilledQuantity"],"additionalProperties":false}},"paymentSchedule":{"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"],"additionalProperties":false}}},"required":["id","direction","kind","documentType","number","status","documentDate","dueDate","partnerId","partnerName","currencyCode","exchangeRate","pricesIncludeVat","totalNet","totalVat","totalGross","totalNetBase","totalVatBase","totalGrossBase","sendStatus","fulfillmentStatus","originalDocumentId","sourceDocumentId","registeredAt","isImported","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/purchase-invoices/{id}/unregister":{"post":{"summary":"Atregistruoti","tags":["Pirkimai"],"description":"Reikalinga teisė: `purchases:register`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["sales","purchase"]},"kind":{"type":"string","enum":["order","proforma","invoice","credit_note","debit_note"]},"documentType":{"type":"string"},"number":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"documentDate":{"type":"string"},"dueDate":{"type":["string","null"]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerName":{"type":"string"},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"pricesIncludeVat":{"type":"boolean"},"totalNet":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVat":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGross":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalNetBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVatBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGrossBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"sendStatus":{"type":"string"},"fulfillmentStatus":{"type":["string","null"]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"registeredAt":{"type":["string","null"]},"isImported":{"type":"boolean"},"deliveryCountryCode":{"type":["string","null"]},"ossCountryCode":{"type":["string","null"]},"ossWarnings":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"unitCode":{"type":["string","null"]},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"discountPercent":{"type":"string"},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCode":{"type":["string","null"]},"vatRate":{"type":"string"},"reverseCharge":{"type":"boolean"},"netAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"grossAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"fulfilledQuantity":{"type":"string"},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","itemId","description","unitCode","quantity","unitPrice","discountPercent","taxCodeId","vatRate","reverseCharge","netAmount","vatAmount","grossAmount","netAmountBase","vatAmountBase","fulfilledQuantity"],"additionalProperties":false}},"paymentSchedule":{"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"],"additionalProperties":false}}},"required":["id","direction","kind","documentType","number","status","documentDate","dueDate","partnerId","partnerName","currencyCode","exchangeRate","pricesIncludeVat","totalNet","totalVat","totalGross","totalNetBase","totalVatBase","totalGrossBase","sendStatus","fulfillmentStatus","originalDocumentId","sourceDocumentId","registeredAt","isImported","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/purchase-invoices/{id}/send":{"post":{"summary":"Išsiųsti PDF el. paštu","tags":["Pirkimai"],"description":"Reikalinga teisė: `purchases:update`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"to":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"message":{"type":"string","maxLength":5000}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["sales","purchase"]},"kind":{"type":"string","enum":["order","proforma","invoice","credit_note","debit_note"]},"documentType":{"type":"string"},"number":{"type":["string","null"]},"status":{"type":"string","enum":["draft","registered","cancelled"]},"documentDate":{"type":"string"},"dueDate":{"type":["string","null"]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerName":{"type":"string"},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"pricesIncludeVat":{"type":"boolean"},"totalNet":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVat":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGross":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalNetBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalVatBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGrossBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"sendStatus":{"type":"string"},"fulfillmentStatus":{"type":["string","null"]},"originalDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"registeredAt":{"type":["string","null"]},"isImported":{"type":"boolean"},"deliveryCountryCode":{"type":["string","null"]},"ossCountryCode":{"type":["string","null"]},"ossWarnings":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"unitCode":{"type":["string","null"]},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"discountPercent":{"type":"string"},"taxCodeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"taxCode":{"type":["string","null"]},"vatRate":{"type":"string"},"reverseCharge":{"type":"boolean"},"netAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"grossAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"vatAmountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"fulfilledQuantity":{"type":"string"},"promotionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","lineNo","itemId","description","unitCode","quantity","unitPrice","discountPercent","taxCodeId","vatRate","reverseCharge","netAmount","vatAmount","grossAmount","netAmountBase","vatAmountBase","fulfilledQuantity"],"additionalProperties":false}},"paymentSchedule":{"type":"array","items":{"type":"object","properties":{"dueDate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["dueDate","amount"],"additionalProperties":false}}},"required":["id","direction","kind","documentType","number","status","documentDate","dueDate","partnerId","partnerName","currencyCode","exchangeRate","pricesIncludeVat","totalNet","totalVat","totalGross","totalNetBase","totalVatBase","totalGrossBase","sendStatus","fulfillmentStatus","originalDocumentId","sourceDocumentId","registeredAt","isImported","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/purchase-invoices/{id}/pdf":{"get":{"summary":"Atsisiųsti PDF","tags":["Pirkimai"],"description":"Reikalinga teisė: `purchases:read`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/prices":{"get":{"summary":"Prekės kaina klientui datai (sutartis, akcija, kainynas)","tags":["Kainos"],"description":"Reikalinga teisė: `sales:read`","parameters":[{"name":"direction","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":"sales","type":"string","enum":["sales","purchase"]}},{"name":"partnerId","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"itemId","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"date","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"contractId","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"priceCategoryId","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/contracts":{"get":{"summary":"Sutarčių sąrašas","tags":["Kainos"],"description":"Reikalinga teisė: `sales:read`","parameters":[{"name":"limit","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":50,"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":500}},{"name":"updated_since","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"q","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":200}}],"responses":{"200":{"description":"OK"},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}},"post":{"summary":"Sukurti sutartį","tags":["Kainos"],"description":"Reikalinga teisė: `sales:create`","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"direction":{"default":"sales","type":"string","enum":["sales","purchase"]},"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"number":{"type":"string","minLength":1,"maxLength":50},"name":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"validFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"paymentTermDays":{"anyOf":[{"type":"integer","minimum":0,"maximum":3650},{"type":"null"}]},"priceCategoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"discountPercent":{"default":"0","type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},"currencyCode":{"default":"EUR","type":"string","minLength":3,"maxLength":3},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"isActive":{"default":true,"type":"boolean"},"prices":{"default":[],"maxItems":10000,"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"price":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},"discountPercent":{"default":"0","type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"}},"required":["itemId","price"]}}},"required":["partnerId","number","validFrom"]}}}},"responses":{"200":{"description":"OK"},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/contracts/{id}":{"get":{"summary":"Sutartis su kainomis","tags":["Kainos"],"description":"Reikalinga teisė: `sales:read`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/fixed-assets":{"get":{"summary":"Ilgalaikio turto sąrašas","tags":["Ilgalaikis turtas"],"description":"Reikalinga teisė: `fixed_assets:read`","parameters":[{"name":"limit","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":50,"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":500}},{"name":"updated_since","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"q","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":200}},{"name":"status","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["new","in_use","disposed"]}},{"name":"categoryId","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"departmentId","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"inventoryNumber":{"type":"string"},"name":{"type":"string"},"categoryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["new","in_use","disposed"]},"acquisitionDate":{"type":["string","null"]},"acquisitionValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"commissioningDate":{"type":["string","null"]},"residualValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"method":{"type":"string","enum":["straight_line","double_declining","units_of_production"]},"lifeMonths":{"type":"number"},"totalUnits":{"type":["string","null"]},"taxMethod":{"type":"string","enum":["straight_line","double_declining","units_of_production","immediate"]},"taxLifeMonths":{"type":"number"},"taxResidualValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"usedForRnd":{"type":"boolean"},"co2Emissions":{"type":["number","null"]},"carCapExempt":{"type":"boolean"},"isBus":{"type":"boolean"},"depreciationSuspended":{"type":"boolean"},"disposedAt":{"type":["string","null"]},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"departmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"costObjectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"location":{"type":["string","null"]},"serialNumber":{"type":["string","null"]},"notes":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"accounting":{"type":"object","properties":{"acquisitionValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"revaluation":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"impairment":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"accumulatedDepreciation":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netBookValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["acquisitionValue","revaluation","impairment","accumulatedDepreciation","netBookValue"],"additionalProperties":false},"tax":{"type":"object","properties":{"acquisitionValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"revaluation":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"impairment":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"accumulatedDepreciation":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netBookValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["acquisitionValue","revaluation","impairment","accumulatedDepreciation","netBookValue"],"additionalProperties":false}},"required":["id","inventoryNumber","name","categoryId","status","acquisitionDate","acquisitionValue","commissioningDate","residualValue","method","lifeMonths","totalUnits","taxMethod","taxLifeMonths","taxResidualValue","usedForRnd","co2Emissions","carCapExempt","isBus","depreciationSuspended","disposedAt","responsiblePersonId","departmentId","costObjectId","projectId","location","serialNumber","notes","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}},"post":{"summary":"Sukurti IT kortelę (ir užpajamuoti)","tags":["Ilgalaikis turtas"],"description":"Reikalinga teisė: `fixed_assets:create`","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"inventoryNumber":{"type":"string","minLength":1,"maxLength":50},"name":{"type":"string","minLength":1,"maxLength":300},"categoryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"commissioningDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"residualValue":{"default":"0","type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"method":{"type":"string","enum":["straight_line","double_declining","units_of_production"]},"lifeMonths":{"type":"integer","minimum":1,"maximum":1200},"totalUnits":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"taxMethod":{"type":"string","enum":["straight_line","double_declining","units_of_production","immediate"]},"taxLifeMonths":{"type":"integer","minimum":1,"maximum":1200},"taxResidualValue":{"default":"0","type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"usedForRnd":{"default":false,"type":"boolean"},"co2Emissions":{"anyOf":[{"type":"integer","minimum":0,"maximum":2000},{"type":"null"}]},"carCapExempt":{"type":"boolean"},"isBus":{"type":"boolean"},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"departmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"costObjectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"location":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"serialNumber":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"acquisition":{"type":"object","properties":{"documentDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"taxAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"creditAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"register":{"type":"boolean"}},"required":["documentDate","amount","creditAccountId"]}},"required":["inventoryNumber","name","categoryId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"inventoryNumber":{"type":"string"},"name":{"type":"string"},"categoryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["new","in_use","disposed"]},"acquisitionDate":{"type":["string","null"]},"acquisitionValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"commissioningDate":{"type":["string","null"]},"residualValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"method":{"type":"string","enum":["straight_line","double_declining","units_of_production"]},"lifeMonths":{"type":"number"},"totalUnits":{"type":["string","null"]},"taxMethod":{"type":"string","enum":["straight_line","double_declining","units_of_production","immediate"]},"taxLifeMonths":{"type":"number"},"taxResidualValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"usedForRnd":{"type":"boolean"},"co2Emissions":{"type":["number","null"]},"carCapExempt":{"type":"boolean"},"isBus":{"type":"boolean"},"depreciationSuspended":{"type":"boolean"},"disposedAt":{"type":["string","null"]},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"departmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"costObjectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"location":{"type":["string","null"]},"serialNumber":{"type":["string","null"]},"notes":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"accounting":{"type":"object","properties":{"acquisitionValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"revaluation":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"impairment":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"accumulatedDepreciation":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netBookValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["acquisitionValue","revaluation","impairment","accumulatedDepreciation","netBookValue"],"additionalProperties":false},"tax":{"type":"object","properties":{"acquisitionValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"revaluation":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"impairment":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"accumulatedDepreciation":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netBookValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["acquisitionValue","revaluation","impairment","accumulatedDepreciation","netBookValue"],"additionalProperties":false}},"required":["id","inventoryNumber","name","categoryId","status","acquisitionDate","acquisitionValue","commissioningDate","residualValue","method","lifeMonths","totalUnits","taxMethod","taxLifeMonths","taxResidualValue","usedForRnd","co2Emissions","carCapExempt","isBus","depreciationSuspended","disposedAt","responsiblePersonId","departmentId","costObjectId","projectId","location","serialNumber","notes","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/fixed-assets/{id}":{"get":{"summary":"IT kortelė su vertėmis","tags":["Ilgalaikis turtas"],"description":"Reikalinga teisė: `fixed_assets:read`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"inventoryNumber":{"type":"string"},"name":{"type":"string"},"categoryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["new","in_use","disposed"]},"acquisitionDate":{"type":["string","null"]},"acquisitionValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"commissioningDate":{"type":["string","null"]},"residualValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"method":{"type":"string","enum":["straight_line","double_declining","units_of_production"]},"lifeMonths":{"type":"number"},"totalUnits":{"type":["string","null"]},"taxMethod":{"type":"string","enum":["straight_line","double_declining","units_of_production","immediate"]},"taxLifeMonths":{"type":"number"},"taxResidualValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"usedForRnd":{"type":"boolean"},"co2Emissions":{"type":["number","null"]},"carCapExempt":{"type":"boolean"},"isBus":{"type":"boolean"},"depreciationSuspended":{"type":"boolean"},"disposedAt":{"type":["string","null"]},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"departmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"costObjectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"location":{"type":["string","null"]},"serialNumber":{"type":["string","null"]},"notes":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"accounting":{"type":"object","properties":{"acquisitionValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"revaluation":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"impairment":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"accumulatedDepreciation":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netBookValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["acquisitionValue","revaluation","impairment","accumulatedDepreciation","netBookValue"],"additionalProperties":false},"tax":{"type":"object","properties":{"acquisitionValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"revaluation":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"impairment":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"accumulatedDepreciation":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netBookValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["acquisitionValue","revaluation","impairment","accumulatedDepreciation","netBookValue"],"additionalProperties":false}},"required":["id","inventoryNumber","name","categoryId","status","acquisitionDate","acquisitionValue","commissioningDate","residualValue","method","lifeMonths","totalUnits","taxMethod","taxLifeMonths","taxResidualValue","usedForRnd","co2Emissions","carCapExempt","isBus","depreciationSuspended","disposedAt","responsiblePersonId","departmentId","costObjectId","projectId","location","serialNumber","notes","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}},"patch":{"summary":"Pakeisti IT kortelę","tags":["Ilgalaikis turtas"],"description":"Reikalinga teisė: `fixed_assets:update`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"inventoryNumber":{"type":"string","minLength":1,"maxLength":50},"name":{"type":"string","minLength":1,"maxLength":300},"categoryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"commissioningDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"residualValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"method":{"type":"string","enum":["straight_line","double_declining","units_of_production"]},"lifeMonths":{"type":"integer","minimum":1,"maximum":1200},"totalUnits":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]},"taxMethod":{"type":"string","enum":["straight_line","double_declining","units_of_production","immediate"]},"taxLifeMonths":{"type":"integer","minimum":1,"maximum":1200},"taxResidualValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"usedForRnd":{"type":"boolean"},"co2Emissions":{"anyOf":[{"type":"integer","minimum":0,"maximum":2000},{"type":"null"}]},"carCapExempt":{"type":"boolean"},"isBus":{"type":"boolean"},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"departmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"costObjectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"location":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"serialNumber":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"inventoryNumber":{"type":"string"},"name":{"type":"string"},"categoryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["new","in_use","disposed"]},"acquisitionDate":{"type":["string","null"]},"acquisitionValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"commissioningDate":{"type":["string","null"]},"residualValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"method":{"type":"string","enum":["straight_line","double_declining","units_of_production"]},"lifeMonths":{"type":"number"},"totalUnits":{"type":["string","null"]},"taxMethod":{"type":"string","enum":["straight_line","double_declining","units_of_production","immediate"]},"taxLifeMonths":{"type":"number"},"taxResidualValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"usedForRnd":{"type":"boolean"},"co2Emissions":{"type":["number","null"]},"carCapExempt":{"type":"boolean"},"isBus":{"type":"boolean"},"depreciationSuspended":{"type":"boolean"},"disposedAt":{"type":["string","null"]},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"departmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"costObjectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"location":{"type":["string","null"]},"serialNumber":{"type":["string","null"]},"notes":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"accounting":{"type":"object","properties":{"acquisitionValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"revaluation":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"impairment":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"accumulatedDepreciation":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netBookValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["acquisitionValue","revaluation","impairment","accumulatedDepreciation","netBookValue"],"additionalProperties":false},"tax":{"type":"object","properties":{"acquisitionValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"revaluation":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"impairment":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"accumulatedDepreciation":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"netBookValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"}},"required":["acquisitionValue","revaluation","impairment","accumulatedDepreciation","netBookValue"],"additionalProperties":false}},"required":["id","inventoryNumber","name","categoryId","status","acquisitionDate","acquisitionValue","commissioningDate","residualValue","method","lifeMonths","totalUnits","taxMethod","taxLifeMonths","taxResidualValue","usedForRnd","co2Emissions","carCapExempt","isBus","depreciationSuspended","disposedAt","responsiblePersonId","departmentId","costObjectId","projectId","location","serialNumber","notes","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/fixed-asset-operations":{"get":{"summary":"IT operacijos","tags":["Ilgalaikis turtas"],"description":"Reikalinga teisė: `fixed_assets:read`","parameters":[{"name":"limit","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":50,"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":500}},{"name":"updated_since","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"status","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["draft","registered","cancelled"]}},{"name":"kind","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["acquisition","opening_balance","improvement","term_change","revaluation","impairment","transfer","suspension","resumption","write_off","sale"]}},{"name":"assetId","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"from","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"q","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["acquisition","opening_balance","improvement","term_change","revaluation","impairment","transfer","suspension","resumption","write_off","sale"]},"number":{"type":["string","null"]},"documentDate":{"type":"string"},"status":{"type":"string","enum":["draft","registered","cancelled"]},"description":{"type":["string","null"]},"offsetAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"proceedsAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"partnerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentType":{"type":["string","null"]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentNumber":{"type":["string","null"]},"registeredAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"warnings":{"type":"array","items":{"type":"string"}}},"required":["id","kind","number","documentDate","status","description","offsetAccountId","proceedsAccountId","partnerId","sourceDocumentType","sourceDocumentId","sourceDocumentNumber","registeredAt","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}},"post":{"summary":"Sukurti (ir užregistruoti) IT operaciją","tags":["Ilgalaikis turtas"],"description":"Reikalinga teisė: `fixed_assets:create`","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["acquisition","opening_balance","improvement","term_change","revaluation","impairment","transfer","suspension","resumption","write_off","sale"]},"documentDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"seriesId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"offsetAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"proceedsAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"partnerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"lines":{"minItems":1,"maxItems":5000,"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"taxAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"accumulatedDepreciation":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"taxAccumulatedDepreciation":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"priorMonths":{"type":"integer","minimum":0,"maximum":1200},"taxPriorMonths":{"type":"integer","minimum":0,"maximum":1200},"impairment":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"saleAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"newMethod":{"type":"string","enum":["straight_line","double_declining","units_of_production"]},"newLifeMonths":{"type":"integer","minimum":1,"maximum":1200},"newResidualValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"newTotalUnits":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},"newTaxMethod":{"type":"string","enum":["straight_line","double_declining","units_of_production","immediate"]},"newTaxLifeMonths":{"type":"integer","minimum":1,"maximum":1200},"newTaxResidualValue":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"newDepartmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"newResponsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"newLocation":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"commissioningDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["assetId"]}},"register":{"type":"boolean"}},"required":["kind","documentDate","lines"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["acquisition","opening_balance","improvement","term_change","revaluation","impairment","transfer","suspension","resumption","write_off","sale"]},"number":{"type":["string","null"]},"documentDate":{"type":"string"},"status":{"type":"string","enum":["draft","registered","cancelled"]},"description":{"type":["string","null"]},"offsetAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"proceedsAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"partnerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentType":{"type":["string","null"]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentNumber":{"type":["string","null"]},"registeredAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"warnings":{"type":"array","items":{"type":"string"}}},"required":["id","kind","number","documentDate","status","description","offsetAccountId","proceedsAccountId","partnerId","sourceDocumentType","sourceDocumentId","sourceDocumentNumber","registeredAt","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/fixed-asset-operations/{id}":{"get":{"summary":"IT operacija","tags":["Ilgalaikis turtas"],"description":"Reikalinga teisė: `fixed_assets:read`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["acquisition","opening_balance","improvement","term_change","revaluation","impairment","transfer","suspension","resumption","write_off","sale"]},"number":{"type":["string","null"]},"documentDate":{"type":"string"},"status":{"type":"string","enum":["draft","registered","cancelled"]},"description":{"type":["string","null"]},"offsetAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"proceedsAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"partnerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentType":{"type":["string","null"]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentNumber":{"type":["string","null"]},"registeredAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"warnings":{"type":"array","items":{"type":"string"}}},"required":["id","kind","number","documentDate","status","description","offsetAccountId","proceedsAccountId","partnerId","sourceDocumentType","sourceDocumentId","sourceDocumentNumber","registeredAt","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/fixed-asset-operations/{id}/register":{"post":{"summary":"Užregistruoti IT operaciją","tags":["Ilgalaikis turtas"],"description":"Reikalinga teisė: `fixed_assets:register`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["acquisition","opening_balance","improvement","term_change","revaluation","impairment","transfer","suspension","resumption","write_off","sale"]},"number":{"type":["string","null"]},"documentDate":{"type":"string"},"status":{"type":"string","enum":["draft","registered","cancelled"]},"description":{"type":["string","null"]},"offsetAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"proceedsAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"partnerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentType":{"type":["string","null"]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentNumber":{"type":["string","null"]},"registeredAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"warnings":{"type":"array","items":{"type":"string"}}},"required":["id","kind","number","documentDate","status","description","offsetAccountId","proceedsAccountId","partnerId","sourceDocumentType","sourceDocumentId","sourceDocumentNumber","registeredAt","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/fixed-asset-operations/{id}/unregister":{"post":{"summary":"Atregistruoti IT operaciją","tags":["Ilgalaikis turtas"],"description":"Reikalinga teisė: `fixed_assets:register`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["acquisition","opening_balance","improvement","term_change","revaluation","impairment","transfer","suspension","resumption","write_off","sale"]},"number":{"type":["string","null"]},"documentDate":{"type":"string"},"status":{"type":"string","enum":["draft","registered","cancelled"]},"description":{"type":["string","null"]},"offsetAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"proceedsAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"partnerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentType":{"type":["string","null"]},"sourceDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sourceDocumentNumber":{"type":["string","null"]},"registeredAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"warnings":{"type":"array","items":{"type":"string"}}},"required":["id","kind","number","documentDate","status","description","offsetAccountId","proceedsAccountId","partnerId","sourceDocumentType","sourceDocumentId","sourceDocumentNumber","registeredAt","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/payments":{"get":{"summary":"Mokėjimų ir kasos orderių sąrašas","tags":["Pinigai"],"description":"Reikalinga teisė: `money:read`","parameters":[{"name":"limit","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":50,"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":500}},{"name":"updated_since","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"q","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":200}},{"name":"status","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["draft","registered","cancelled"]}},{"name":"documentType","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["bank_payment","cash_receipt","cash_disbursement"]}},{"name":"partnerId","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"bankAccountId","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"cashRegisterId","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"from","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentType":{"type":"string"},"number":{"type":["string","null"]},"documentDate":{"type":"string"},"status":{"type":"string","enum":["draft","registered","cancelled"]},"direction":{"type":"string","enum":["in","out"]},"bankAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"cashRegisterId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"partnerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"amountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"description":{"type":["string","null"]},"reference":{"type":["string","null"]},"counterpartyName":{"type":["string","null"]},"counterpartyIban":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"type":{"type":"string","enum":["settle","advance","account","accountable"]},"partnerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"partnerKind":{"anyOf":[{"type":"string","enum":["receivable","payable","advance_received","advance_paid"]},{"type":"null"}]},"targetDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"targetNumber":{"type":["string","null"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"itemAmount":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},{"type":"null"}]},"description":{"type":["string","null"]}},"required":["id","lineNo","type","partnerId","partnerKind","targetDocumentId","targetNumber","accountId","responsiblePersonId","amount","itemAmount","description"],"additionalProperties":false}}},"required":["id","documentType","number","documentDate","status","direction","bankAccountId","cashRegisterId","partnerId","currencyCode","exchangeRate","amount","amountBase","description","reference","counterpartyName","counterpartyIban","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}},"post":{"summary":"Sukurti mokėjimą (be eilučių – paskirstoma seniausioms skoloms)","tags":["Pinigai"],"description":"Reikalinga teisė: `money:create`","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"documentType":{"default":"bank_payment","type":"string","enum":["bank_payment","cash_receipt","cash_disbursement"]},"documentDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"seriesId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["in","out"]},"bankAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"cashRegisterId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"partnerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"currencyCode":{"default":"EUR","type":"string","minLength":3,"maxLength":3},"exchangeRate":{"default":"1","type":"string","pattern":"^\\d{1,13}(\\.\\d{1,6})?$"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"reference":{"anyOf":[{"type":"string","maxLength":140},{"type":"null"}]},"endToEndId":{"anyOf":[{"type":"string","maxLength":35},{"type":"null"}]},"counterpartyName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"counterpartyIban":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"counterpartyCode":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"personName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"personIdentity":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"basis":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"attachments":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"lines":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["settle","advance","account","accountable"]},"partnerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"partnerKind":{"anyOf":[{"type":"string","enum":["receivable","payable","advance_received","advance_paid"]},{"type":"null"}]},"targetDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"itemAmount":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"departmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"costObjectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["type","amount"]}},"register":{"type":"boolean"}},"required":["documentDate","amount"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentType":{"type":"string"},"number":{"type":["string","null"]},"documentDate":{"type":"string"},"status":{"type":"string","enum":["draft","registered","cancelled"]},"direction":{"type":"string","enum":["in","out"]},"bankAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"cashRegisterId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"partnerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"amountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"description":{"type":["string","null"]},"reference":{"type":["string","null"]},"counterpartyName":{"type":["string","null"]},"counterpartyIban":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"type":{"type":"string","enum":["settle","advance","account","accountable"]},"partnerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"partnerKind":{"anyOf":[{"type":"string","enum":["receivable","payable","advance_received","advance_paid"]},{"type":"null"}]},"targetDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"targetNumber":{"type":["string","null"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"itemAmount":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},{"type":"null"}]},"description":{"type":["string","null"]}},"required":["id","lineNo","type","partnerId","partnerKind","targetDocumentId","targetNumber","accountId","responsiblePersonId","amount","itemAmount","description"],"additionalProperties":false}}},"required":["id","documentType","number","documentDate","status","direction","bankAccountId","cashRegisterId","partnerId","currencyCode","exchangeRate","amount","amountBase","description","reference","counterpartyName","counterpartyIban","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/payments/{id}":{"get":{"summary":"Mokėjimas su eilutėmis","tags":["Pinigai"],"description":"Reikalinga teisė: `money:read`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentType":{"type":"string"},"number":{"type":["string","null"]},"documentDate":{"type":"string"},"status":{"type":"string","enum":["draft","registered","cancelled"]},"direction":{"type":"string","enum":["in","out"]},"bankAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"cashRegisterId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"partnerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"amountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"description":{"type":["string","null"]},"reference":{"type":["string","null"]},"counterpartyName":{"type":["string","null"]},"counterpartyIban":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"type":{"type":"string","enum":["settle","advance","account","accountable"]},"partnerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"partnerKind":{"anyOf":[{"type":"string","enum":["receivable","payable","advance_received","advance_paid"]},{"type":"null"}]},"targetDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"targetNumber":{"type":["string","null"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"itemAmount":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},{"type":"null"}]},"description":{"type":["string","null"]}},"required":["id","lineNo","type","partnerId","partnerKind","targetDocumentId","targetNumber","accountId","responsiblePersonId","amount","itemAmount","description"],"additionalProperties":false}}},"required":["id","documentType","number","documentDate","status","direction","bankAccountId","cashRegisterId","partnerId","currencyCode","exchangeRate","amount","amountBase","description","reference","counterpartyName","counterpartyIban","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/payments/{id}/register":{"post":{"summary":"Užregistruoti mokėjimą","tags":["Pinigai"],"description":"Reikalinga teisė: `money:register`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentType":{"type":"string"},"number":{"type":["string","null"]},"documentDate":{"type":"string"},"status":{"type":"string","enum":["draft","registered","cancelled"]},"direction":{"type":"string","enum":["in","out"]},"bankAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"cashRegisterId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"partnerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"currencyCode":{"type":"string"},"exchangeRate":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"amountBase":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"description":{"type":["string","null"]},"reference":{"type":["string","null"]},"counterpartyName":{"type":["string","null"]},"counterpartyIban":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineNo":{"type":"number"},"type":{"type":"string","enum":["settle","advance","account","accountable"]},"partnerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"partnerKind":{"anyOf":[{"type":"string","enum":["receivable","payable","advance_received","advance_paid"]},{"type":"null"}]},"targetDocumentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"targetNumber":{"type":["string","null"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"itemAmount":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},{"type":"null"}]},"description":{"type":["string","null"]}},"required":["id","lineNo","type","partnerId","partnerKind","targetDocumentId","targetNumber","accountId","responsiblePersonId","amount","itemAmount","description"],"additionalProperties":false}}},"required":["id","documentType","number","documentDate","status","direction","bankAccountId","cashRegisterId","partnerId","currencyCode","exchangeRate","amount","amountBase","description","reference","counterpartyName","counterpartyIban","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/receivables":{"get":{"summary":"Pirkėjų skolos (atviri dokumentai) datai","tags":["Skolos"],"description":"Reikalinga teisė: `money:read`","parameters":[{"name":"date","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"partnerId","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"overdueOnly","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["true","false"]}},{"name":"limit","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":1000,"type":"integer","minimum":1,"maximum":5000}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerName":{"type":["string","null"]},"kind":{"type":"string","enum":["receivable","payable","advance_received","advance_paid"]},"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentType":{"type":["string","null"]},"documentNumber":{"type":["string","null"]},"documentDate":{"type":["string","null"]},"dueDate":{"type":["string","null"]},"currencyCode":{"type":"string"},"originalAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"balance":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"balanceCurrency":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"daysOverdue":{"type":"number"}},"required":["partnerId","partnerName","kind","documentId","documentType","documentNumber","documentDate","dueDate","currencyCode","originalAmount","balance","balanceCurrency","daysOverdue"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/payables":{"get":{"summary":"Skolos tiekėjams (atviri dokumentai) datai","tags":["Skolos"],"description":"Reikalinga teisė: `money:read`","parameters":[{"name":"date","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"partnerId","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"overdueOnly","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["true","false"]}},{"name":"limit","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":1000,"type":"integer","minimum":1,"maximum":5000}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"partnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerName":{"type":["string","null"]},"kind":{"type":"string","enum":["receivable","payable","advance_received","advance_paid"]},"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentType":{"type":["string","null"]},"documentNumber":{"type":["string","null"]},"documentDate":{"type":["string","null"]},"dueDate":{"type":["string","null"]},"currencyCode":{"type":"string"},"originalAmount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"balance":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"balanceCurrency":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"daysOverdue":{"type":"number"}},"required":["partnerId","partnerName","kind","documentId","documentType","documentNumber","documentDate","dueDate","currencyCode","originalAmount","balance","balanceCurrency","daysOverdue"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/bank-statements":{"get":{"summary":"Importuoti banko išrašai","tags":["Pinigai"],"description":"Reikalinga teisė: `money:read`","parameters":[{"name":"limit","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":50,"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":500}},{"name":"updated_since","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"q","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":200}},{"name":"bankAccountId","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}},"post":{"summary":"Importuoti banko išrašą (camt.053/054, CSV)","tags":["Pinigai"],"description":"Reikalinga teisė: `money:create`","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"format":{"default":"auto","type":"string","enum":["auto","camt053","camt054","csv_swedbank","csv_seb","csv_luminor","csv_siauliu","csv_revolut","csv_paysera"]},"bankAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"filename":{"default":"statement","type":"string","maxLength":255},"content":{"type":"string","minLength":1,"maxLength":20000000},"encoding":{"default":"utf8","type":"string","enum":["utf8","base64"]},"autoMatch":{"default":true,"type":"boolean"},"autoPost":{"default":false,"type":"boolean"}},"required":["content"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"statements":{"type":"array","items":{"type":"object","properties":{"statementId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lines":{"type":"number"},"matched":{"type":"number"}},"required":["statementId","lines","matched"],"additionalProperties":{}}}},"required":["statements"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/bank-statements/{id}":{"get":{"summary":"Banko išrašas su eilutėmis ir susiejimu","tags":["Pinigai"],"description":"Reikalinga teisė: `money:read`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/payroll/employees":{"get":{"summary":"Darbuotojų sąrašas (be asmens kodų ir sąskaitų)","tags":["Darbo užmokestis"],"description":"Reikalinga teisė: `hr:read`","parameters":[{"name":"limit","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":50,"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":500}},{"name":"updated_since","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"q","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"code":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":["string","null"]},"departmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"positionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"status":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","code","firstName","lastName","email","departmentId","positionId","status","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/payroll/runs":{"get":{"summary":"DU žiniaraščių sąrašas","tags":["Darbo užmokestis"],"description":"Reikalinga teisė: `payroll:read`","parameters":[{"name":"limit","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":50,"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":500}},{"name":"updated_since","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"year","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"integer","minimum":2025,"maximum":2100}},{"name":"status","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["draft","registered","cancelled"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"number":{"type":["string","null"]},"year":{"type":"number"},"month":{"type":"number"},"runType":{"type":"string"},"status":{"type":"string"},"documentDate":{"type":"string"},"totalGross":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalNet":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGpm":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalSodraEmployee":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalEmployer":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"employeeCount":{"type":"number"},"updatedAt":{"type":"string"}},"required":["id","number","year","month","runType","status","documentDate","totalGross","totalNet","totalGpm","totalSodraEmployee","totalEmployer","employeeCount","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/payroll/runs/{id}":{"get":{"summary":"DU žiniaraštis (sumos)","tags":["Darbo užmokestis"],"description":"Reikalinga teisė: `payroll:read`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"number":{"type":["string","null"]},"year":{"type":"number"},"month":{"type":"number"},"runType":{"type":"string"},"status":{"type":"string"},"documentDate":{"type":"string"},"totalGross":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalNet":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalGpm":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalSodraEmployee":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"totalEmployer":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"employeeCount":{"type":"number"},"updatedAt":{"type":"string"}},"required":["id","number","year","month","runType","status","documentDate","totalGross","totalNet","totalGpm","totalSodraEmployee","totalEmployer","employeeCount","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/migration/batches":{"get":{"summary":"Importo partijos","tags":["Migracija"],"description":"Reikalinga teisė: `migration:read`","parameters":[{"name":"limit","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":50,"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":500}},{"name":"updated_since","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"q","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"sourceFormat":{"type":"string","enum":["isaft","isaf","xlsx","csv"]},"sourceSystem":{"type":"string"},"status":{"type":"string"},"step":{"type":["string","null"]},"progressTotal":{"type":"number"},"progressDone":{"type":"number"},"error":{"type":["string","null"]},"importedAt":{"type":["string","null"]},"rolledBackAt":{"type":["string","null"]},"createdAt":{"type":"string"},"counts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}}}},"required":["id","name","sourceFormat","sourceSystem","status","step","progressTotal","progressDone","error","importedAt","rolledBackAt","createdAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/migration/batches/{id}":{"get":{"summary":"Importo partija (būsena, progresas, įrašų skaičiai)","tags":["Migracija"],"description":"Reikalinga teisė: `migration:read`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"sourceFormat":{"type":"string","enum":["isaft","isaf","xlsx","csv"]},"sourceSystem":{"type":"string"},"status":{"type":"string"},"step":{"type":["string","null"]},"progressTotal":{"type":"number"},"progressDone":{"type":"number"},"error":{"type":["string","null"]},"importedAt":{"type":["string","null"]},"rolledBackAt":{"type":["string","null"]},"createdAt":{"type":"string"},"counts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}}}},"required":["id","name","sourceFormat","sourceSystem","status","step","progressTotal","progressDone","error","importedAt","rolledBackAt","createdAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/migration/batches/{id}/report":{"get":{"summary":"Sutikrinimo ataskaita","tags":["Migracija"],"description":"Reikalinga teisė: `migration:read`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"batchId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"ok":{"type":"boolean"},"counts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}}},"sourceChecks":{"type":"array","items":{"type":"object","properties":{"level":{"type":"string"},"message":{"type":"string"}},"required":["level","message"],"additionalProperties":false}}},"required":["batchId","ok","counts","sourceChecks"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/crm/leads":{"get":{"summary":"Potencialių klientų sąrašas","tags":["CRM"],"description":"Reikalinga teisė: `crm:read`","parameters":[{"name":"limit","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":50,"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":500}},{"name":"updated_since","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"q","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":200}},{"name":"status","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":30}},{"name":"tag","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":50}},{"name":"all","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":300},"companyName":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"companyCode":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"vatCode":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"status":{"default":"new","type":"string","enum":["new","contacted","qualified","disqualified","converted"]},"ownerUserId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"tags":{"default":[],"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":50}},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"updatedAt":{"type":"string"}},"required":["name","status","tags","id","partnerId","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}},"post":{"summary":"Sukurti potencialų klientą (pvz. iš svetainės formos)","tags":["CRM"],"description":"Reikalinga teisė: `crm:create`","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":300},"companyName":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"companyCode":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"vatCode":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"status":{"default":"new","type":"string","enum":["new","contacted","qualified","disqualified","converted"]},"ownerUserId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"tags":{"default":[],"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":50}},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":300},"companyName":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"companyCode":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"vatCode":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"status":{"default":"new","type":"string","enum":["new","contacted","qualified","disqualified","converted"]},"ownerUserId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"tags":{"default":[],"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":50}},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partnerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"updatedAt":{"type":"string"}},"required":["name","status","tags","id","partnerId","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/crm/opportunities":{"get":{"summary":"Pardavimo galimybės","tags":["CRM"],"description":"Reikalinga teisė: `crm:read`","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":300},"partnerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"leadId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"stageId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"amount":{"default":"0","type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"currencyCode":{"default":"EUR","type":"string","minLength":3,"maxLength":3},"probability":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]},"expectedCloseDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"ownerUserId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"tags":{"default":[],"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":50}},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["open","won","lost"]},"updatedAt":{"type":"string"}},"required":["name","amount","currencyCode","tags","id","status","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/pm/projects":{"get":{"summary":"Projektai","tags":["Projektai"],"description":"Reikalinga teisė: `projects:read`","parameters":[{"name":"q","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","maxLength":200}},{"name":"status","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["planned","active","on_hold","completed","cancelled"]}},{"name":"partnerId","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/pm/time-entries":{"post":{"summary":"Užregistruoti dirbtą laiką","tags":["Projektai"],"description":"Reikalinga teisė: `projects:create`","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"taskId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"userId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"workDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"hours":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"billable":{"default":true,"type":"boolean"},"hourlyRate":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},{"type":"null"}]}},"required":["projectId","workDate","hours"]}}}},"responses":{"200":{"description":"OK"},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/pm/reports/profitability":{"get":{"summary":"Projektų pelningumas iš DK","tags":["Projektai"],"description":"Reikalinga teisė: `projects:read`","parameters":[{"name":"projectId","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"from","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/ocr/documents":{"post":{"summary":"Įkelti pirkimo sąskaitą atpažinimui (base64)","tags":["Skaitmeninimas"],"description":"Reikalinga teisė: `ocr:create`","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":300},"contentType":{"type":"string","minLength":1,"maxLength":100},"contentBase64":{"type":"string","minLength":1,"maxLength":35000000},"source":{"default":"api","type":"string","enum":["upload","email","api"]},"emailFrom":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"emailSubject":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["filename","contentType","contentBase64"]}}}},"responses":{"200":{"description":"OK"},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/ocr/inbound-email":{"post":{"summary":"Gautas el. laiškas su sąskaitomis (pašto šliuzas)","tags":["Skaitmeninimas"],"description":"Reikalinga teisė: `ocr:create`","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"from":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"subject":{"default":"","type":"string","maxLength":500},"attachments":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":300},"contentType":{"type":"string","minLength":1,"maxLength":100},"contentBase64":{"type":"string","minLength":1,"maxLength":35000000}},"required":["filename","contentType","contentBase64"]}}},"required":["from","attachments"]}}}},"responses":{"200":{"description":"OK"},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/production/orders":{"get":{"summary":"Gamybos aktai","tags":["Gamyba"],"description":"Reikalinga teisė: `production:read`","parameters":[],"responses":{"200":{"description":"OK"},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}},"post":{"summary":"Sukurti gamybos aktą (MES)","tags":["Gamyba"],"description":"Reikalinga teisė: `production:create`","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"documentDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"bomId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"quantity":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},"warehouseId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"outputWarehouseId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"alternatives":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"extraCosts":{"default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":300},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["description","amount","accountId"]}},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"seriesId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"register":{"type":"boolean"},"departmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"costObjectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"responsiblePersonId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["documentDate","bomId","quantity"]}}}},"responses":{"200":{"description":"OK"},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/pos/registers/{id}/config":{"get":{"summary":"Kasos konfigūracija ir prekių katalogas (id = kasos kodas)","tags":["Kasos"],"description":"Reikalinga teisė: `pos:read`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/pos/sync":{"post":{"summary":"Kasos pamainų, operacijų ir kvitų sinchronizacija (idempotentiška pagal clientId)","tags":["Kasos"],"description":"Reikalinga teisė: `pos:create`","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"registerCode":{"type":"string","minLength":1,"maxLength":50},"shifts":{"default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"clientId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"shiftNo":{"type":"integer","minimum":1,"maximum":9007199254740991},"openedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"openingCash":{"default":"0","type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"closedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"closingCashCounted":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},{"type":"null"}]}},"required":["clientId","shiftNo","openedAt"]}},"cashMovements":{"default":[],"maxItems":500,"type":"array","items":{"type":"object","properties":{"clientId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"shiftClientId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["in","out"]},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"reason":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["clientId","shiftClientId","kind","amount","at"]}},"receipts":{"default":[],"maxItems":1000,"type":"array","items":{"type":"object","properties":{"clientId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"shiftClientId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"receiptNo":{"type":"string","minLength":1,"maxLength":50},"soldAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"kind":{"default":"sale","type":"string","enum":["sale","return"]},"originalReceiptNo":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"loyaltyCardCode":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"lines":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"itemId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"giftCardCode":{"anyOf":[{"type":"string","minLength":4,"maxLength":50},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"description":{"type":"string","minLength":1,"maxLength":300},"quantity":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},"unitPrice":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},"discountPercent":{"default":"0","type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},"vatRate":{"default":"0","type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"}},"required":["description","quantity","unitPrice"]}},"payments":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"method":{"type":"string","enum":["cash","card","gift_card","other"]},"amount":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"giftCardCode":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"terminalReference":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]}},"required":["method","amount"]}},"cashTendered":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},{"type":"null"}]},"changeGiven":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},{"type":"null"}]},"fiscal":{"anyOf":[{"type":"object","properties":{"number":{"type":"string","maxLength":100},"signature":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["number"]},{"type":"null"}]},"eReceipt":{"type":"boolean"}},"required":["clientId","shiftClientId","receiptNo","soldAt","lines","payments"]}}},"required":["registerCode"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"shifts":{"type":"array","items":{"type":"object","properties":{"clientId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string"},"error":{"type":"string"}},"required":["clientId","status"],"additionalProperties":false}},"cashMovements":{"type":"array","items":{"type":"object","properties":{"clientId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string"},"error":{"type":"string"}},"required":["clientId","status"],"additionalProperties":false}},"receipts":{"type":"array","items":{"type":"object","properties":{"clientId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["created","duplicate","error"]},"error":{"type":"string"}},"required":["clientId","status"],"additionalProperties":false}}},"required":["shifts","cashMovements","receipts"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/pos/shifts/{id}/x-report":{"get":{"summary":"X ataskaita (id = pamainos clientId)","tags":["Kasos"],"description":"Reikalinga teisė: `pos:read`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/pos/gift-cards/{id}":{"get":{"summary":"Dovanų kortelės likutis (id = kodas)","tags":["Kasos"],"description":"Reikalinga teisė: `pos:read`","parameters":[{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/shop-orders":{"post":{"summary":"E. parduotuvės užsakymas → klientas + pardavimo sąskaita / užsakymas (vienu kvietimu, idempotentiška pagal externalId)","tags":["E. parduotuvės"],"description":"Reikalinga teisė: `sales:create`","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Pakartotinė užklausa su tuo pačiu raktu grąžina tą patį atsakymą (24 val.).","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"externalId":{"type":"string","minLength":1,"maxLength":100},"number":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"status":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"paidAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"currency":{"default":"EUR","type":"string","minLength":3,"maxLength":3},"pricesIncludeVat":{"default":true,"type":"boolean"},"customer":{"type":"object","properties":{"externalId":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":300,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"firstName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"company":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"companyCode":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"vatCode":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"street":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"postalCode":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"countryCode":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]}}},"lines":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"externalId":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"sku":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"quantity":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,4})?$"},"name":{"type":"string","minLength":1,"maxLength":500},"total":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"tax":{"default":"0","type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"taxRate":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]}},"required":["quantity","name","total"]}},"shipping":{"default":[],"maxItems":10,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"total":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"tax":{"default":"0","type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"taxRate":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]}},"required":["name","total"]}},"fees":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"total":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"tax":{"default":"0","type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"taxRate":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]}},"required":["name","total"]}},"total":{"type":"string","pattern":"^-?\\d{1,17}(\\.\\d{1,2})?$"},"paymentMethod":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["externalId","createdAt","customer","lines","total"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"externalId":{"type":"string"},"status":{"type":"string","enum":["processing","completed","failed"]},"duplicate":{"type":"boolean","description":"true – užsakymas jau buvo apdorotas (HTTP 200), dokumentas nekuriamas iš naujo"},"documentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"documentType":{"type":["string","null"]},"documentNumber":{"type":["string","null"]},"documentStatus":{"type":["string","null"]},"warnings":{"type":"array","items":{"type":"string"}}},"required":["id","externalId","status","duplicate","documentId","documentType","documentNumber","documentStatus","warnings"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/shop-connection":{"get":{"summary":"API raktui priskirta e. parduotuvės jungtis ir jos nustatymai","tags":["E. parduotuvės"],"description":"Reikalinga teisė: `sales:read`","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"platform":{"type":"string","enum":["woocommerce","prestashop","shopify","custom"]},"name":{"type":"string"},"status":{"type":"string","enum":["pending","active","disabled"]},"shopUrl":{"type":["string","null"]},"settings":{"type":"object","properties":{"documentMode":{"type":"string","enum":["invoice","invoice_draft","order"]},"warehouseId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"syncStock":{"type":"boolean"},"syncPrices":{"type":"boolean"}},"required":["documentMode","warehouseId","syncStock","syncPrices"],"additionalProperties":false}},"required":["id","platform","name","status","shopUrl","settings"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/shop-connection/activate":{"post":{"summary":"Įskiepio prisijungimas: parduotuvės adresas ir webhook'ų adresas (grąžina parašo raktą)","tags":["E. parduotuvės"],"description":"Reikalinga teisė: `sales:read`","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"shopUrl":{"type":"string","maxLength":500,"format":"uri"},"webhookUrl":{"anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"type":"null"}]},"pluginVersion":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"platformVersion":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]}},"required":["shopUrl"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"platform":{"type":"string","enum":["woocommerce","prestashop","shopify","custom"]},"name":{"type":"string"},"status":{"type":"string","enum":["pending","active","disabled"]},"shopUrl":{"type":["string","null"]},"settings":{"type":"object","properties":{"documentMode":{"type":"string","enum":["invoice","invoice_draft","order"]},"warehouseId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"syncStock":{"type":"boolean"},"syncPrices":{"type":"boolean"}},"required":["documentMode","warehouseId","syncStock","syncPrices"],"additionalProperties":false},"webhookSecret":{"type":["string","null"]}},"required":["id","platform","name","status","shopUrl","settings","webhookSecret"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}},"/v1/shop-connection/events":{"post":{"summary":"Įskiepio pranešimai jungties žurnalui (likučių / kainų sinchronizavimo rezultatai, klaidos)","tags":["E. parduotuvės"],"description":"Reikalinga teisė: `sales:read`","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"events":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"level":{"type":"string","enum":["info","warning","error"]},"kind":{"type":"string","enum":["order","stock","prices","connection"]},"message":{"type":"string","minLength":1,"maxLength":1000},"externalRef":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["level","kind","message"]}}},"required":["events"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accepted":{"type":"number"}},"required":["accepted"],"additionalProperties":false}}}},"401":{"description":"Neteisingas arba nenurodytas API raktas","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"API raktas neturi teisės","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Validacijos ar verslo taisyklės klaida","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Viršytas techninis užklausų limitas"}}}}}}