{ "openapi": "3.0.4", "info": { "title": "MojeGS1 API", "version": "v2" }, "paths": { "/api/v2/localizations/{GLN}": { "get": { "tags": [ "AddressesExternal" ], "parameters": [ { "name": "GLN", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/LocalizationDto" }, "example": { "type": "localizations", "id": "5900009900057", "attributes": { "name": "Przykładowa lokalizacja", "ediDocuments": true, "physicalLocalization": false, "description": "Przykładowy opis lokalizacji", "country": "PL", "postalCode": "02-002", "city": "Warszawa", "streetAndNumber": "Emilii Plater 1", "latitude": 51.123456, "longitude": 19.123456, "lastModificationDate": "2019-08-06T09:47:10+02:00" } } }, "application/json": { "schema": { "$ref": "#/components/schemas/LocalizationDto" } }, "text/json": { "schema": { "$ref": "#/components/schemas/LocalizationDto" } } } }, "401": { "description": "Unauthorized", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" }, "example": { "status": 401, "title": "Błąd autoryzacji", "detail": null, "errors": null } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } } } }, "404": { "description": "Not Found", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" }, "example": { "status": 404, "title": "Nie znaleziono zasobu", "detail": "Nie znaleziono produktu na podstawie podanego numeru GTIN", "errors": null } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } } } }, "500": { "description": "Internal Server Error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } } } } }, "security": [ { "basic": [ ] } ] }, "put": { "tags": [ "AddressesExternal" ], "parameters": [ { "name": "GLN", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocalizationDto" }, "example": { "type": "localizations", "id": "5900009900057", "attributes": { "name": "Przykładowa lokalizacja", "ediDocuments": true, "physicalLocalization": false, "description": "Przykładowy opis lokalizacji", "country": "PL", "postalCode": "02-002", "city": "Warszawa", "streetAndNumber": "Emilii Plater 1", "latitude": 51.123456, "longitude": 19.123456 } } }, "text/json": { "schema": { "$ref": "#/components/schemas/LocalizationDto" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/LocalizationDto" } } } }, "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/UpsertLocalizationResponse" }, "example": { "result": "OK" } }, "application/json": { "schema": { "$ref": "#/components/schemas/UpsertLocalizationResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/UpsertLocalizationResponse" } } } }, "400": { "description": "Bad Request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" }, "example": { "status": 400, "title": "Błąd walidacji", "detail": null, "errors": [ { "field": "data.attributes.brandName", "message": "Pole musi mieć co najmniej 2 znaki" }, { "field": "data.attributes.gpcCode", "message": "Pole nie może być puste" } ] } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } } } }, "401": { "description": "Unauthorized", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" }, "example": { "status": 401, "title": "Błąd autoryzacji", "detail": null, "errors": null } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } } } }, "500": { "description": "Internal Server Error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } } } } }, "security": [ { "basic": [ ] } ] }, "delete": { "tags": [ "AddressesExternal" ], "parameters": [ { "name": "GLN", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } } } }, "401": { "description": "Unauthorized", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } } } }, "404": { "description": "Not Found", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } } } }, "500": { "description": "Internal Server Error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } } } } }, "security": [ { "basic": [ ] } ] } }, "/api/v2/localizations": { "get": { "tags": [ "AddressesExternal" ], "parameters": [ { "name": "page[offset]", "in": "query", "schema": { "type": "string", "default": "0" } }, { "name": "page[limit]", "in": "query", "schema": { "type": "string", "default": "10" } }, { "name": "filter[keyword]", "in": "query", "schema": { "type": "string", "default": "" } }, { "name": "sort", "in": "query", "schema": { "type": "string", "default": "" } } ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/GetLocalizationsResponse" }, "example": { "links": { "self": "https://mojegs1.pl/api/v2/localizations?page[offset]=0&page[limit]=10&sort=-name", "first": "https://mojegs1.pl/api/v2/localizations?page[offset]=0&page[limit]=10&sort=-name", "prev": null, "next": "https://mojegs1.pl/api/v2/localizations?page[offset]=1&page[limit]=10&sort=-name", "last": "https://mojegs1.pl/api/v2/localizations?page[offset]=5&page[limit]=10&sort=-name" }, "data": { "items": [ { "type": "localizations", "id": "5900009900057", "attributes": { "name": "Przykładowa lokalizacja", "ediDocuments": true, "physicalLocalization": false, "description": "Przykładowy opis lokalizacji", "country": "PL", "postalCode": "02-002", "city": "Warszawa", "streetAndNumber": "Emilii Plater 1", "latitude": 51.123456, "longitude": 19.123456, "lastModificationDate": "2019-08-06T09:47:10+02:00" } } ], "total": 2, "pageSize": 10, "pageNo": 0 } } }, "application/json": { "schema": { "$ref": "#/components/schemas/GetLocalizationsResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/GetLocalizationsResponse" } } } }, "400": { "description": "Bad Request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" }, "example": { "status": 400, "title": "Niepoprawny parametr", "detail": "Nieprawidłowy format żądania", "errors": null } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } } } }, "401": { "description": "Unauthorized", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" }, "example": { "status": 401, "title": "Błąd autoryzacji", "detail": null, "errors": null } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } } } }, "500": { "description": "Internal Server Error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } } } } }, "security": [ { "basic": [ ] } ] } }, "/api/v2/products/{Gtin}": { "get": { "tags": [ "ProductsExternal" ], "parameters": [ { "name": "Gtin", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/GetExternalProductResponse" }, "example": { "data": { "type": "products", "id": "5903321563092", "attributes": { "brandName": "Marka", "description": "Opis produktu", "descriptionLanguage": "pl", "commonName": "Produkt testowy", "gpcCode": 10000002, "lastModificationDate": "2018-08-06T09:47:10.543Z", "name": "Marka Podmarka Produkt testowy wariant 50kg", "netContent": 50, "netContentUnit": "kg", "productImage": "http://www.images.mojegs1.pl/products/590/321/654/0590321654_MARKT_L.jpg", "productWebsite": "http://www.przykladowy-produkt.com", "qualityDetails": { "suggestions": [ "Dane na stronie internetowej produktu powinny dotyczyć dokładnie tego produktu" ] }, "status": "ACT", "subBrandName": "Podmarka", "targetMarket": [ "PL", "DE" ], "variant": "wariant" } } } }, "application/json": { "schema": { "$ref": "#/components/schemas/GetExternalProductResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/GetExternalProductResponse" } } } }, "400": { "description": "Bad Request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" }, "example": { "status": 400, "title": "Niepoprawny parametr", "detail": "Nieprawidłowy format żądania", "errors": null } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } } } }, "401": { "description": "Unauthorized", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" }, "example": { "status": 401, "title": "Błąd autoryzacji", "detail": null, "errors": null } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } } } }, "404": { "description": "Not Found", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" }, "example": { "status": 404, "title": "Nie znaleziono zasobu", "detail": "Nie znaleziono produktu na podstawie podanego numeru GTIN", "errors": null } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } } } } }, "security": [ { "basic": [ ] } ] }, "put": { "tags": [ "ProductsExternal" ], "parameters": [ { "name": "Gtin", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpsertProductExternalRequest" }, "example": { "data": { "type": "products", "id": "5903321563092", "attributes": { "brandName": "Marka", "description": "Opis produktu", "descriptionLanguage": "pl", "commonName": "Produkt testowy", "gpcCode": 10000002, "netContent": 50, "netContentUnit": "kg", "productImage": "http://www.images.mojegs1.pl/products/590/321/654/0590321654_MARKT_L.jpg", "productWebsite": "http://www.przykladowy-produkt.com", "status": "ACT", "subBrandName": "Podmarka", "targetMarket": [ "PL", "DE" ], "variant": "wariant" } } } }, "text/json": { "schema": { "$ref": "#/components/schemas/UpsertProductExternalRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/UpsertProductExternalRequest" } } } }, "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/UpsertProductResponse" }, "example": { "result": "OK", "qualityDetails": { "suggestions": [ "Dane na stronie internetowej produktu powinny dotyczyć dokładnie tego produktu" ] } } }, "application/json": { "schema": { "$ref": "#/components/schemas/UpsertProductResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/UpsertProductResponse" } } } }, "400": { "description": "Bad Request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" }, "example": { "status": 400, "title": "Błąd walidacji", "detail": null, "errors": [ { "field": "data.attributes.brandName", "message": "Pole musi mieć co najmniej 2 znaki" }, { "field": "data.attributes.gpcCode", "message": "Pole nie może być puste" } ] } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } } } }, "401": { "description": "Unauthorized", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" }, "example": { "status": 401, "title": "Błąd autoryzacji", "detail": null, "errors": null } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } } } } }, "security": [ { "basic": [ ] } ] } }, "/api/v2/products": { "get": { "tags": [ "ProductsExternal" ], "parameters": [ { "name": "filter[keyword]", "in": "query", "schema": { "type": "string" } }, { "name": "page[offset]", "in": "query", "schema": { "type": "string", "default": "1" } }, { "name": "page[limit]", "in": "query", "schema": { "type": "string", "default": "25" } }, { "name": "sort", "in": "query", "schema": { "type": "string", "default": "name" } } ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/GetExternalProductListResponse" }, "example": { "links": { "self": "https://mojegs1.pl/api/v2/products?page[offset]=1&page[limit]=10&sort=-name", "first": "https://mojegs1.pl/api/v2/products?page[offset]=1&page[limit]=10&sort=-name", "prev": "https://mojegs1.pl/api/v2/products?page[offset]=1&page[limit]=10&sort=-name", "next": "https://mojegs1.pl/api/v2/products?page[offset]=2&page[limit]=10&sort=-name", "last": "https://mojegs1.pl/api/v2/products?page[offset]=5&page[limit]=10&sort=-name" }, "data": [ { "type": "products", "id": "5903321563092", "attributes": { "brandName": "Marka", "commonName": "Produkt testowy", "description": "Opis produktu", "descriptionLanguage": "pl", "gpcCode": 10000002, "lastModificationDate": "2018-08-06T09:47:10.543Z", "name": "Marka Podmarka Produkt testowy wariant 50kg", "netContent": 50, "netContentUnit": "kg", "productImage": "http://www.images.mojegs1.pl/products/590/321/654/0590321654_MARKT_L.jpg", "productWebsite": "http://www.przykladowy-produkt.com", "qualityDetails": { "suggestions": [ "Dane na stronie internetowej produktu powinny dotyczyć dokładnie tego produktu" ] }, "status": "ACT", "subBrandName": "Podmarka", "targetMarket": [ "PL", "DE" ], "variant": "wariant" } } ] } }, "application/json": { "schema": { "$ref": "#/components/schemas/GetExternalProductListResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/GetExternalProductListResponse" } } } }, "400": { "description": "Bad Request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" }, "example": { "status": 400, "title": "Niepoprawny parametr", "detail": "Nieprawidłowy format żądania", "errors": null } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } } } }, "401": { "description": "Unauthorized", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" }, "example": { "status": 401, "title": "Błąd autoryzacji", "detail": null, "errors": null } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExternalApiResponse" } } } } }, "security": [ { "basic": [ ] } ] } } }, "components": { "schemas": { "ExternalApiResponse": { "required": [ "status", "title" ], "type": "object", "properties": { "status": { "type": "integer", "description": "HTTP status code.", "format": "int32", "example": 400 }, "title": { "type": "string", "description": "Title of error.", "nullable": true, "example": "Validation error" }, "detail": { "type": "string", "description": "Detail of error.", "nullable": true, "example": "Field can not be empty" }, "errors": { "type": "array", "items": { "$ref": "#/components/schemas/ValidationError" }, "description": "List of validation errors (optional, only for 400 status with many errors).", "nullable": true } }, "additionalProperties": false, "description": "Response for external API." }, "GetExternalProductListResponse": { "required": [ "data", "links" ], "type": "object", "properties": { "links": { "$ref": "#/components/schemas/Links" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/ProductExternalDto" }, "description": "Kolekcja produktów.", "nullable": true } }, "additionalProperties": false }, "GetExternalProductResponse": { "required": [ "data" ], "type": "object", "properties": { "data": { "$ref": "#/components/schemas/ProductExternalDto" } }, "additionalProperties": false }, "GetLocalizationsResponse": { "required": [ "data", "links", "pageNo", "pageSize", "total" ], "type": "object", "properties": { "links": { "$ref": "#/components/schemas/Links" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/LocalizationDto" }, "description": "Lista lokalizacji.", "nullable": true }, "total": { "type": "integer", "description": "Całkowita liczba elementów.", "format": "int32" }, "pageNo": { "type": "integer", "description": "Numer strony.", "format": "int32" }, "pageSize": { "type": "integer", "description": "Rozmiar strony.", "format": "int32" } }, "additionalProperties": false, "description": "Odpowiedź listy lokalizacji." }, "Links": { "type": "object", "properties": { "self": { "type": "string", "description": "Link do bieżącego zasobu.", "nullable": true }, "first": { "type": "string", "description": "Link do pierwszej strony wyników.", "nullable": true }, "prev": { "type": "string", "description": "Link do poprzedniej strony.", "nullable": true }, "next": { "type": "string", "description": "Link do następnej strony.", "nullable": true }, "last": { "type": "string", "description": "Link do ostatniej strony wyników.", "nullable": true } }, "additionalProperties": false, "description": "Kontener linków paginacji." }, "LocalizationAtributes": { "type": "object", "properties": { "name": { "type": "string", "description": "Pełna nazwa lokalizacji.", "nullable": true }, "isEDI": { "type": "boolean", "description": "Określa, czy GLN służy do wymiany dokumentów elektronicznych (EDI).", "nullable": true }, "isPhysicalAddress": { "type": "boolean", "description": "Określa, czy GLN wskazuje lokalizację fizyczną.", "nullable": true }, "description": { "type": "string", "description": "Opis lokalizacji.", "nullable": true }, "country": { "type": "string", "description": "Kod kraju (ISO 3166-1 alpha-2).", "nullable": true }, "postalCode": { "type": "string", "description": "Kod pocztowy.", "nullable": true }, "city": { "type": "string", "description": "Miejscowość.", "nullable": true }, "streetAndNumber": { "type": "string", "description": "Ulica i numer.", "nullable": true }, "latitude": { "type": "string", "description": "Szerokość geograficzna w formacie dziesiętnym.", "nullable": true }, "longitude": { "type": "string", "description": "Długość geograficzna w formacie dziesiętnym.", "nullable": true }, "lastModificationDate": { "type": "string", "description": "Data ostatniej modyfikacji (tylko do odczytu).\nZnacznik czasu RFC3339.", "nullable": true } }, "additionalProperties": false }, "LocalizationDto": { "type": "object", "properties": { "type": { "type": "string", "description": "Typ zasobu. Musi mieć wartość `localizations`.", "nullable": true }, "id": { "type": "string", "description": "Identyfikator lokalizacji – GLN (13 cyfr).", "nullable": true }, "attributes": { "$ref": "#/components/schemas/LocalizationAtributes" } }, "additionalProperties": false }, "PackagingDto": { "required": [ "corkWeight", "depth", "grossWeight", "height", "isRecycling", "materialColor", "materialTypeCode", "netContent", "returnablePackageDepositAmount", "startAvailabilityDateTime", "width" ], "type": "object", "properties": { "description": { "maxLength": 4000, "minLength": 20, "type": "string", "description": "Opis opakowania.", "nullable": true }, "materialTypeCode": { "type": "string", "description": "Rodzaj materiału opakowania.", "nullable": true }, "isRecycling": { "type": "boolean", "description": "Czy opakowanie jest wielokrotnego użytku." }, "materialColor": { "type": "string", "description": "Kolor opakowania.", "nullable": true }, "netContent": { "maxLength": 15, "type": "string", "description": "Zawartość netto.", "nullable": true }, "weightWithCork": { "maxLength": 15, "type": "string", "description": "Waga opakowania z korkiem (g, dopuszczalna część ułamkowa).", "nullable": true }, "corkWeight": { "maxLength": 15, "type": "string", "description": "Waga korka/kapsla w gramach.", "nullable": true }, "grossWeight": { "maxLength": 15, "type": "string", "description": "Waga opakowania bez korka w gramach.", "nullable": true }, "returnablePackageDepositAmount": { "maxLength": 8, "type": "string", "description": "Kwota kaucji w PLN.", "nullable": true }, "returnablePackageDepositAmountCurrency": { "maxLength": 3, "minLength": 0, "type": "string", "description": "Waluta kaucji (ISO 4217).", "nullable": true }, "height": { "maxLength": 15, "type": "string", "description": "Wysokość w milimetrach.", "nullable": true }, "width": { "maxLength": 15, "type": "string", "description": "Szerokość w milimetrach.", "nullable": true }, "depth": { "maxLength": 15, "type": "string", "description": "Głębokość/długość w milimetrach.", "nullable": true }, "startAvailabilityDateTime": { "type": "string", "description": "Data wprowadzenia na rynek.", "format": "date-time" }, "endAvailabilityDateTime": { "type": "string", "description": "Data wycofania z rynku.", "format": "date-time", "nullable": true }, "operatorId": { "maxLength": 50, "type": "string", "description": "NIP operatora.", "nullable": true }, "startAvailabilityWithOperator": { "type": "string", "description": "Data rozpoczęcia uczestnictwa u operatora.", "format": "date-time" }, "endAvailabilityWithOperator": { "type": "string", "description": "Data zakończenia uczestnictwa u operatora.", "format": "date-time", "nullable": true }, "corkColor": { "type": "string", "description": "Kolor korka.", "nullable": true }, "imageLink": { "type": "string", "description": "Link do grafiki na etykiecie.", "nullable": true }, "imageType": { "type": "string", "description": "Rodzaj grafiki.", "nullable": true }, "image3dLink": { "type": "string", "description": "Link do modelu 3D.", "nullable": true }, "image3dType": { "type": "string", "description": "Rodzaj modelu 3D.", "nullable": true } }, "additionalProperties": false }, "ProductAttributesDto": { "required": [ "brandName", "commonName", "descriptionLanguage", "gpcCode", "netContent", "netContentUnit", "qualityDetails", "status", "subBrandName", "targetMarket" ], "type": "object", "properties": { "additionalNetContent1": { "type": "number", "description": "Dodatkowa zawartość netto #1.", "format": "double", "nullable": true }, "additionalNetContent1Unit": { "type": "string", "description": "Jednostka dla AdditionalNetContent1.\nDopuszczalne wartości opisane są przy `netContentUnit`.", "nullable": true }, "additionalNetContent2": { "type": "number", "description": "Dodatkowa zawartość netto #2.", "format": "double", "nullable": true }, "additionalNetContent2Unit": { "type": "string", "description": "Jednostka dla AdditionalNetContent2.", "nullable": true }, "brandName": { "maxLength": 200, "minLength": 2, "type": "string", "description": "Nazwa marki.\nWymagane dla GTIN-13/12/8. Dla GTIN-14 pobierane z produktu bazowego.", "nullable": true }, "commonName": { "maxLength": 150, "type": "string", "description": "Nazwa zwyczajowa produktu.", "nullable": true }, "countItemsInCollectivePackage": { "type": "integer", "description": "Liczba sztuk w opakowaniu zbiorczym.\nWymagane tylko dla wybranych typów produktów.", "format": "int32", "nullable": true }, "description": { "maxLength": 4000, "minLength": 20, "type": "string", "description": "Opis marketingowy.", "nullable": true }, "descriptionLanguage": { "maxLength": 2, "minLength": 0, "type": "string", "description": "Język opisu (ISO 639-1, 2 litery).\nPrzykład: `pl`, `en`.", "nullable": true }, "gpcCode": { "type": "integer", "description": "Kod GPC (Brick) – 8-cyfrowy.", "format": "int64", "nullable": true }, "internalSymbol": { "maxLength": 255, "minLength": 2, "type": "string", "description": "Wewnętrzny symbol produktu (SKU).", "nullable": true }, "lastModificationDate": { "type": "string", "description": "Data ostatniej modyfikacji (tylko do odczytu).\nZnacznik czasu RFC3339, np. `2018-08-06T09:47:10.543Z`.", "nullable": true }, "name": { "maxLength": 400, "type": "string", "description": "Pełna nazwa produktu / label description (tylko do odczytu).\nBudowana automatycznie z brand/subbrand/commonName/variant/netContent.", "nullable": true }, "netContent": { "type": "number", "description": "Wartość zawartości netto.", "format": "double", "nullable": true }, "netContentUnit": { "type": "string", "description": "Jednostka zawartości netto.\nDopuszczalne jednostki: m, cm, mm, l, cl, ml, kg, dkg, g, mg, szt, m2, m3.", "nullable": true }, "productImage": { "type": "string", "description": "URL obrazka produktu lub base64 zależnie od użycia.", "nullable": true }, "productWebsite": { "maxLength": 1000, "minLength": 1, "type": "string", "description": "Adres strony produktu.", "nullable": true }, "qualityDetails": { "$ref": "#/components/schemas/QualityDetails" }, "status": { "type": "string", "description": "Status produktu.\nDopuszczalne wartości:\n`ACT` - Active (Aktywny)`WIT` - Withdrawn (Wycofany)`HID` - Hidden (Ukryty)", "nullable": true }, "subBrandName": { "maxLength": 200, "minLength": 2, "type": "string", "description": "Podmarka (opcjonalnie zależnie od typu GTIN).", "nullable": true }, "targetMarket": { "type": "array", "items": { "type": "string" }, "description": "Rynki docelowe – kody krajów (ISO 3166-1).\nKody specjalne: `EU`, `WW`.", "nullable": true }, "variant": { "maxLength": 70, "minLength": 2, "type": "string", "description": "Wariant.", "nullable": true }, "packaging": { "$ref": "#/components/schemas/PackagingDto" } }, "additionalProperties": false }, "ProductExternalDto": { "required": [ "attributes", "id", "type" ], "type": "object", "properties": { "type": { "type": "string", "description": "Typ zasobu. Musi mieć wartość `products`.", "nullable": true }, "id": { "maxLength": 14, "minLength": 0, "type": "string", "description": "Identyfikator produktu – numer GTIN (8/13/14 cyfr).", "nullable": true }, "attributes": { "$ref": "#/components/schemas/ProductAttributesDto" } }, "additionalProperties": false }, "QualityDetails": { "type": "object", "properties": { "suggestions": { "type": "array", "items": { "type": "string" }, "nullable": true } }, "additionalProperties": false }, "QualityDetailsRecord": { "type": "object", "properties": { "suggestions": { "type": "array", "items": { "type": "string" }, "nullable": true } }, "additionalProperties": false }, "UpsertLocalizationResponse": { "required": [ "result" ], "type": "object", "properties": { "result": { "type": "string", "description": "Kod wyniku operacji.\nOczekiwana wartość: `OK`.", "nullable": true } }, "additionalProperties": false, "description": "Wynik operacji utworzenia/aktualizacji lokalizacji." }, "UpsertProductAttributesExternalRequest": { "type": "object", "properties": { "additionalNetContent1": { "type": "number", "description": "Dodatkowa zawartość netto #1.", "format": "double", "nullable": true }, "additionalNetContent1Unit": { "type": "string", "description": "Jednostka dodatkowej zawartości netto #1.\nDopuszczalne wartości: `m`, `cm`, `mm`, `l`, `cl`, `ml`, `kg`, `dkg`, `g`, `mg`, `szt`, `m2`, `m3`.", "nullable": true }, "additionalNetContent2": { "type": "number", "description": "Dodatkowa zawartość netto #2.", "format": "double", "nullable": true }, "additionalNetContent2Unit": { "type": "string", "description": "Jednostka dodatkowej zawartości netto #2.\nDopuszczalne wartości: `m`, `cm`, `mm`, `l`, `cl`, `ml`, `kg`, `dkg`, `g`, `mg`, `szt`, `m2`, `m3`.", "nullable": true }, "brandName": { "type": "string", "description": "Nazwa marki.", "nullable": true }, "commonName": { "type": "string", "description": "Nazwa zwyczajowa produktu.", "nullable": true }, "countItemsInCollectivePackage": { "type": "integer", "description": "Liczba sztuk w opakowaniu zbiorczym.", "format": "int32", "nullable": true }, "description": { "type": "string", "description": "Opis marketingowy/konsumencki.", "nullable": true }, "descriptionLanguage": { "type": "string", "description": "Język opisu. ISO 639-1 (2 litery), np. `pl`.", "nullable": true }, "gpcCode": { "type": "number", "description": "Kod GPC (brick).", "format": "double", "nullable": true }, "internalSymbol": { "type": "string", "description": "Wewnętrzny identyfikator produktu / SKU.", "nullable": true }, "lastModificationDate": { "type": "string", "description": "Data/czas ostatniej modyfikacji (tylko do odczytu; ignorowane na wejściu).", "nullable": true }, "name": { "type": "string", "description": "Pełna nazwa produktu (może być generowana przez system).", "nullable": true }, "netContent": { "type": "number", "description": "Wartość zawartości netto.", "format": "double", "nullable": true }, "netContentUnit": { "type": "string", "description": "Jednostka zawartości netto.\nDopuszczalne wartości: `m`, `cm`, `mm`, `l`, `cl`, `ml`, `kg`, `dkg`, `g`, `mg`, `szt`, `m2`, `m3`.", "nullable": true }, "productImage": { "type": "string", "description": "Odnośnik do zdjęcia produktu.", "nullable": true }, "productWebsite": { "type": "string", "description": "Adres strony produktu.", "nullable": true }, "qualityDetails": { "$ref": "#/components/schemas/UpsertProductQualityDetailsExternalRequest" }, "status": { "type": "string", "description": "Status produktu.\nDopuszczalne wartości:\n`ACT` – Aktywny`WIT` – Wycofany`HID` – Ukryty", "nullable": true }, "subBrandName": { "type": "string", "description": "Nazwa podmarki.", "nullable": true }, "targetMarket": { "type": "array", "items": { "type": "string" }, "description": "Lista rynków docelowych.\nDopuszczalne wartości: kody krajów ISO 3166-1 alpha-2 (np. `PL`, `DE`) oraz kody specjalne:\n`EU` – Unia Europejska`WW` – Cały świat", "nullable": true }, "variant": { "type": "string", "description": "Wariant produktu.", "nullable": true }, "packaging": { "$ref": "#/components/schemas/UpsertProductPackagingExternalRequest" } }, "additionalProperties": false }, "UpsertProductExternalData": { "required": [ "attributes", "id", "type" ], "type": "object", "properties": { "type": { "type": "string", "description": "Typ zasobu. Musi mieć wartość `products`.", "nullable": true }, "id": { "maxLength": 14, "minLength": 0, "type": "string", "description": "Identyfikator produktu – numer GTIN.", "nullable": true }, "attributes": { "$ref": "#/components/schemas/UpsertProductAttributesExternalRequest" } }, "additionalProperties": false }, "UpsertProductExternalRequest": { "required": [ "data" ], "type": "object", "properties": { "data": { "$ref": "#/components/schemas/UpsertProductExternalData" } }, "additionalProperties": false }, "UpsertProductPackagingExternalRequest": { "required": [ "corkWeight", "depth", "grossWeight", "height", "isRecycling", "materialColor", "materialTypeCode", "netContent", "returnablePackageDepositAmount", "startAvailabilityDateTime", "width" ], "type": "object", "properties": { "description": { "maxLength": 4000, "minLength": 20, "type": "string", "description": "Opis opakowania.", "nullable": true }, "materialTypeCode": { "type": "string", "description": "Kod rodzaju materiału opakowania.\nDopuszczalne wartości:\n`GLASS``GLASS_COLOURED``METAL_ALUMINUM``METAL_BRASS``METAL_IRON``METAL_LEAD``METAL_OTHER``METAL_STAINLESS_STEEL``METAL_STEEL``METAL_TIN``PLASTIC_OTHER``POLYMER_CELLULOSE_ACETATE``POLYMER_EPOXY``POLYMER_EVA``POLYMER_EVOH``POLYMER_HDPE``POLYMER_LDPE``POLYMER_LLDPE``POLYMER_MDPE``POLYMER_NYLON``POLYMER_PAN``POLYMER_PC``POLYMER_PCL``POLYMER_PE``POLYMER_PEN``POLYMER_PET``POLYMER_PHA``POLYMER_PLA``POLYMER_PP``POLYMER_PS``POLYMER_PU``POLYMER_PVA``POLYMER_PVC``POLYMER_PVDC``POLYMER_TPS`", "nullable": true }, "isRecycling": { "type": "boolean", "description": "Informacja czy opakowanie jest zwrotne/wielokrotnego użytku." }, "materialColor": { "type": "string", "description": "Kolor materiału opakowania.\nDopuszczalne wartości:\n`TRANSPARENT``BLUE``GREEN``OTHER`", "nullable": true }, "netContent": { "maxLength": 15, "type": "string", "description": "Nominalna pojemność/zawartość opakowania.", "nullable": true }, "weightWithCork": { "maxLength": 15, "type": "string", "description": "Waga opakowania wraz z korkiem/kapslem.", "nullable": true }, "corkWeight": { "maxLength": 15, "type": "string", "description": "Waga korka/kapsla.", "nullable": true }, "grossWeight": { "maxLength": 15, "type": "string", "description": "Waga opakowania bez korka/kapsla.", "nullable": true }, "returnablePackageDepositAmount": { "maxLength": 8, "type": "string", "description": "Kwota kaucji za opakowanie zwrotne.", "nullable": true }, "returnablePackageDepositAmountCurrency": { "maxLength": 3, "minLength": 0, "type": "string", "description": "Waluta kaucji. Kod ISO 4217 (np. PLN, EUR).", "nullable": true }, "height": { "maxLength": 15, "type": "string", "description": "Wysokość opakowania.", "nullable": true }, "width": { "maxLength": 15, "type": "string", "description": "Szerokość opakowania.", "nullable": true }, "depth": { "maxLength": 15, "type": "string", "description": "Głębokość/długość opakowania.", "nullable": true }, "startAvailabilityDateTime": { "type": "string", "description": "Data/czas rozpoczęcia dostępności na rynku.", "format": "date-time" }, "endAvailabilityDateTime": { "type": "string", "description": "Data/czas zakończenia dostępności na rynku.", "format": "date-time", "nullable": true }, "operatorId": { "maxLength": 50, "type": "string", "description": "Identyfikator operatora.", "nullable": true }, "startAvailabilityWithOperator": { "type": "string", "description": "Data/czas rozpoczęcia dostępności u operatora.", "format": "date-time" }, "endAvailabilityWithOperator": { "type": "string", "description": "Data/czas zakończenia dostępności u operatora.", "format": "date-time", "nullable": true }, "corkColor": { "type": "string", "description": "Kolor korka/kapsla.\nDopuszczalne wartości: `TRANSPARENT`, `BLUE`, `GREEN`, `OTHER`.", "nullable": true }, "imageLink": { "type": "string", "description": "Link do obrazu opakowania/etykiety.", "nullable": true }, "imageType": { "type": "string", "description": "Kod typu obrazu.\nDopuszczalne wartości:\n`DIET_CERTIFICATE``DOCUMENT``GROUP_CHARACTERISTIC_SHEET``LOGO``MARKETING_INFORMATION``OUT_OF_PACKAGE_IMAGE``PLANOGRAM``PRODUCT_LABEL_IMAGE``SAFETY_DATA_SHEET``SAFETY_SUMMARY_SHEET``TRADE_ITEM_DESCRIPTION``VIDEO``WARRANTY_INFORMATION``WEBSITE`", "nullable": true }, "image3dLink": { "type": "string", "description": "Link do obrazu/modelu 3D.", "nullable": true }, "image3dType": { "type": "string", "description": "Kod typu obrazu/modelu 3D.\nDopuszczalne wartości:\n`DIET_CERTIFICATE``DOCUMENT``GROUP_CHARACTERISTIC_SHEET``LOGO``MARKETING_INFORMATION``OUT_OF_PACKAGE_IMAGE``PLANOGRAM``PRODUCT_LABEL_IMAGE``SAFETY_DATA_SHEET``SAFETY_SUMMARY_SHEET``TRADE_ITEM_DESCRIPTION``VIDEO``WARRANTY_INFORMATION``WEBSITE`", "nullable": true } }, "additionalProperties": false }, "UpsertProductQualityDetailsExternalRequest": { "required": [ "suggestions" ], "type": "object", "properties": { "suggestions": { "type": "array", "items": { "type": "string" }, "description": "Sugestie/ostrzeżenia jakości danych (zazwyczaj tylko do odczytu).\nTo pole jest wykorzystywane przez API do zwracania podpowiedzi; wysyłanie go w żądaniu może być ignorowane.", "nullable": true } }, "additionalProperties": false }, "UpsertProductResponse": { "required": [ "qualityDetails", "result" ], "type": "object", "properties": { "result": { "type": "string", "nullable": true }, "qualityDetails": { "$ref": "#/components/schemas/QualityDetailsRecord" } }, "additionalProperties": false }, "ValidationError": { "required": [ "field", "message" ], "type": "object", "properties": { "field": { "type": "string", "description": "Source of error (path to field in JSON).", "nullable": true, "example": "data.attributes.brandName" }, "message": { "type": "string", "description": "Detail of error.", "nullable": true, "example": "Field must be at least 2 characters long." } }, "additionalProperties": false, "description": "Single validation error." } }, "securitySchemes": { "basic": { "type": "http", "description": "Podaj login i haslo", "scheme": "basic" } } }, "security": [ { "Bearer": [ ] }, { "ApiKey": [ ] } ] }