Files
orderPRO/tmp_external_api_swagger.json

2025 lines
66 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"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<list type=\"bullet\"><item><description>`ACT` - Active (Aktywny)</description></item><item><description>`WIT` - Withdrawn (Wycofany)</description></item><item><description>`HID` - Hidden (Ukryty)</description></item></list>",
"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<list type=\"bullet\"><item><description>`ACT` Aktywny</description></item><item><description>`WIT` Wycofany</description></item><item><description>`HID` Ukryty</description></item></list>",
"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<list type=\"bullet\"><item><description>`EU` Unia Europejska</description></item><item><description>`WW` Ca³y œwiat</description></item></list>",
"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<list type=\"bullet\"><item><description>`GLASS`</description></item><item><description>`GLASS_COLOURED`</description></item><item><description>`METAL_ALUMINUM`</description></item><item><description>`METAL_BRASS`</description></item><item><description>`METAL_IRON`</description></item><item><description>`METAL_LEAD`</description></item><item><description>`METAL_OTHER`</description></item><item><description>`METAL_STAINLESS_STEEL`</description></item><item><description>`METAL_STEEL`</description></item><item><description>`METAL_TIN`</description></item><item><description>`PLASTIC_OTHER`</description></item><item><description>`POLYMER_CELLULOSE_ACETATE`</description></item><item><description>`POLYMER_EPOXY`</description></item><item><description>`POLYMER_EVA`</description></item><item><description>`POLYMER_EVOH`</description></item><item><description>`POLYMER_HDPE`</description></item><item><description>`POLYMER_LDPE`</description></item><item><description>`POLYMER_LLDPE`</description></item><item><description>`POLYMER_MDPE`</description></item><item><description>`POLYMER_NYLON`</description></item><item><description>`POLYMER_PAN`</description></item><item><description>`POLYMER_PC`</description></item><item><description>`POLYMER_PCL`</description></item><item><description>`POLYMER_PE`</description></item><item><description>`POLYMER_PEN`</description></item><item><description>`POLYMER_PET`</description></item><item><description>`POLYMER_PHA`</description></item><item><description>`POLYMER_PLA`</description></item><item><description>`POLYMER_PP`</description></item><item><description>`POLYMER_PS`</description></item><item><description>`POLYMER_PU`</description></item><item><description>`POLYMER_PVA`</description></item><item><description>`POLYMER_PVC`</description></item><item><description>`POLYMER_PVDC`</description></item><item><description>`POLYMER_TPS`</description></item></list>",
"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<list type=\"bullet\"><item><description>`TRANSPARENT`</description></item><item><description>`BLUE`</description></item><item><description>`GREEN`</description></item><item><description>`OTHER`</description></item></list>",
"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<list type=\"bullet\"><item><description>`DIET_CERTIFICATE`</description></item><item><description>`DOCUMENT`</description></item><item><description>`GROUP_CHARACTERISTIC_SHEET`</description></item><item><description>`LOGO`</description></item><item><description>`MARKETING_INFORMATION`</description></item><item><description>`OUT_OF_PACKAGE_IMAGE`</description></item><item><description>`PLANOGRAM`</description></item><item><description>`PRODUCT_LABEL_IMAGE`</description></item><item><description>`SAFETY_DATA_SHEET`</description></item><item><description>`SAFETY_SUMMARY_SHEET`</description></item><item><description>`TRADE_ITEM_DESCRIPTION`</description></item><item><description>`VIDEO`</description></item><item><description>`WARRANTY_INFORMATION`</description></item><item><description>`WEBSITE`</description></item></list>",
"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<list type=\"bullet\"><item><description>`DIET_CERTIFICATE`</description></item><item><description>`DOCUMENT`</description></item><item><description>`GROUP_CHARACTERISTIC_SHEET`</description></item><item><description>`LOGO`</description></item><item><description>`MARKETING_INFORMATION`</description></item><item><description>`OUT_OF_PACKAGE_IMAGE`</description></item><item><description>`PLANOGRAM`</description></item><item><description>`PRODUCT_LABEL_IMAGE`</description></item><item><description>`SAFETY_DATA_SHEET`</description></item><item><description>`SAFETY_SUMMARY_SHEET`</description></item><item><description>`TRADE_ITEM_DESCRIPTION`</description></item><item><description>`VIDEO`</description></item><item><description>`WARRANTY_INFORMATION`</description></item><item><description>`WEBSITE`</description></item></list>",
"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": [ ]
}
]
}