Skip to content

Commit 697c991

Browse files
author
github-actions
committed
feat: Update OpenAPI file replicated from CMS4
1 parent 461d480 commit 697c991

1 file changed

Lines changed: 70 additions & 82 deletions

File tree

openapi/openapi.yaml

Lines changed: 70 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -25508,15 +25508,27 @@ paths:
2550825508
$ref: '#/components/schemas/Errors'
2550925509
metadata:
2551025510
$ref: '#/components/schemas/Metadata'
25511-
example:
25512-
data: null
25513-
errors:
25514-
-
25515-
errorCode: invalid-request-data
25516-
message: 'Field cannot be empty string.'
25517-
instance: data.reasonRemark
25518-
metadata:
25519-
requestId: 019c8c34-64f3-7328-af43-bf1e34fa39d7
25511+
examples:
25512+
invalid-request-data-1:
25513+
value:
25514+
data: null
25515+
errors:
25516+
-
25517+
errorCode: invalid-request-data
25518+
message: 'Field cannot be empty string.'
25519+
instance: data.reasonRemark
25520+
metadata:
25521+
requestId: 019c8c34-64f3-7328-af43-bf1e34fa39d7
25522+
invalid-request-data-2:
25523+
value:
25524+
data: null
25525+
errors:
25526+
-
25527+
errorCode: invalid-request-data
25528+
message: 'Provided item amount for id \"123\" is greater than current document item amount.'
25529+
instance: integration-call
25530+
metadata:
25531+
requestId: 019c8c34-64f3-7328-af43-bf1e34fa39d7
2552025532
summary: 'Credit note from invoice creation'
2552125533
operationId: createCreditNoteFromInvoice
2552225534
description: |-
@@ -25843,7 +25855,7 @@ paths:
2584325855
additionalProperties: false
2584425856
summary: 'Creation of credit note item'
2584525857
operationId: createCreditNoteItem
25846-
description: 'Creates a new credit note item to an existing credit note.'
25858+
description: 'Creates a new credit note item to an existing credit, only billing or shipping item types are allowed.'
2584725859
tags:
2584825860
- 'Credit notes'
2584925861
parameters:
@@ -25868,7 +25880,6 @@ paths:
2586825880
data:
2586925881
type: object
2587025882
additionalProperties: false
25871-
minProperties: 1
2587225883
required:
2587325884
- itemType
2587425885
- name
@@ -25877,13 +25888,12 @@ paths:
2587725888
itemType:
2587825889
type: string
2587925890
minLength: 1
25880-
description: 'item type, required (allowed `product` or `product-set` only)'
25881-
examples:
25882-
- product
25883-
code:
25884-
type: string
25891+
description: 'item type, required (allowed `billing` or `shipping` only)'
25892+
enum:
25893+
- billing
25894+
- shipping
2588525895
examples:
25886-
- '2018000012'
25896+
- billing
2588725897
amount:
2588825898
$ref: '#/components/schemas/typeAmountNullable'
2588925899
description: 'name of item, required'
@@ -25894,20 +25904,6 @@ paths:
2589425904
description: 'name of item, required'
2589525905
examples:
2589625906
- 'Item name'
25897-
variantName:
25898-
type:
25899-
- string
25900-
- 'null'
25901-
description: 'name of variant (can be `null`)'
25902-
examples:
25903-
- white
25904-
amountUnit:
25905-
type:
25906-
- string
25907-
- 'null'
25908-
description: 'unit of amount (`kg`, `ks`) (can be `null`)'
25909-
examples:
25910-
- kg
2591125907
price:
2591225908
type: string
2591325909
description: 'price of item, 2 decimal places accuracy (can be `null`), default value `0.00`'
@@ -25924,9 +25920,6 @@ paths:
2592425920
vatRate:
2592525921
$ref: '#/components/schemas/typeVatRate'
2592625922
description: 'VAT rate in percent'
25927-
weight:
25928-
$ref: '#/components/schemas/typeWeightRequest'
25929-
description: 'weight of the item, 3 decimal places accuracy (can be `null`)'
2593025923
remark:
2593125924
type:
2593225925
- string
@@ -25968,6 +25961,46 @@ paths:
2596825961
- errors
2596925962
- metadata
2597025963
additionalProperties: false
25964+
422:
25965+
description: 'Unprocessable Entity'
25966+
content:
25967+
application/json:
25968+
schema:
25969+
type: object
25970+
properties:
25971+
data:
25972+
type:
25973+
- object
25974+
- 'null'
25975+
errors:
25976+
$ref: '#/components/schemas/Errors'
25977+
example:
25978+
data: null
25979+
errors:
25980+
-
25981+
errorCode: credit-note-item-price-lower-than-zero
25982+
message: 'Price must be greater or equal than zero.'
25983+
instance: data.price
25984+
-
25985+
errorCode: credit-note-item-greater-than-invoice
25986+
message: 'Price must be equal or lower than connected invoice price.'
25987+
instance: data.price
25988+
-
25989+
errorCode: credit-note-item-amount-lower-than-invoice
25990+
message: 'Amount must be equal or greater than connected invoice price.'
25991+
instance: data.amount
25992+
-
25993+
errorCode: credit-note-item-amount-greater-than-zero
25994+
message: 'Amount must be lower than zero.'
25995+
instance: data.amount
25996+
-
25997+
errorCode: credit-note-item-invalid-vat-rate
25998+
message: 'Unsupported "tax" value "99.00" given. Supported values are "12.00, 21.00".'
25999+
instance: data.vatRate
26000+
-
26001+
errorCode: credit-note-item-mismatch
26002+
message: 'Credit note item with ID 1 doesn\''t belong to the credit note with code "001".'
26003+
instance: data.vatRate
2597126004
summary: 'Update of credit note item'
2597226005
operationId: updateCreditNoteItem
2597326006
description: |-
@@ -26010,37 +26043,12 @@ paths:
2601026043
additionalProperties: false
2601126044
minProperties: 1
2601226045
properties:
26013-
code:
26014-
type: string
26015-
examples:
26016-
- '2018000012'
2601726046
amount:
26018-
$ref: '#/components/schemas/typeAmountNullable'
26019-
description: 'amount of item, 3 decimal places accuracy, required. For credit note you will probably use negative amount. (can be `null`)'
26020-
name:
26021-
type:
26022-
- string
26023-
- 'null'
26024-
description: 'name of item (can be `null`)'
26025-
examples:
26026-
- 'Item name'
26027-
variantName:
26028-
type:
26029-
- string
26030-
- 'null'
26031-
description: 'name of variant (can be `null`)'
26032-
examples:
26033-
- white
26034-
amountUnit:
26035-
type:
26036-
- string
26037-
- 'null'
26038-
description: 'unit of amount (can be `null`)'
26039-
examples:
26040-
- 'kg, ks'
26047+
$ref: '#/components/schemas/typeAmount'
26048+
description: 'amount of item, 3 decimal places accuracy. For credit note use negative amount. Value cannot be greater than amount of original invoice item.'
2604126049
price:
2604226050
type: string
26043-
description: 'price of item, 3 decimal places accuracy (can be `null`), default value `0.00`'
26051+
description: 'price of item, without vat, 3 decimal places accuracy. Value cannot be greater than price of original invoice item or lower than 0.'
2604426052
examples:
2604526053
- '125.00'
2604626054
includingVat:
@@ -26051,26 +26059,6 @@ paths:
2605126059
vatRate:
2605226060
$ref: '#/components/schemas/typeVatRate'
2605326061
description: 'VAT rate in percent'
26054-
priceRatio:
26055-
$ref: '#/components/schemas/typePriceRatio'
26056-
description: 'value of discount of price, 4 decimal places accuracy, (from `0.0000` to `1.0000`), e.g. `0.8500` means 85% discount (can be `null`)'
26057-
weight:
26058-
$ref: '#/components/schemas/typeWeightRequest'
26059-
description: 'weight of the item, 3 decimal places accuracy (can be `null`)'
26060-
remark:
26061-
type:
26062-
- string
26063-
- 'null'
26064-
description: 'item note (can be `null`)'
26065-
examples:
26066-
- 'Item note'
26067-
additionalField:
26068-
type:
26069-
- string
26070-
- 'null'
26071-
description: 'field for additional info (can be `null`)'
26072-
examples:
26073-
- 'additional info'
2607426062
delete:
2607526063
responses:
2607626064
200:

0 commit comments

Comments
 (0)