Zgłoś szkic do publikacji
POST
/api/v1/listings/{id}/publishPublikacja płatna przygotowuje koszyk do potwierdzenia w portalu. Wymaga włączonej flagi LISTING_API_PAYMENTS_ENABLED.
Publikacja sprawdza wszystkie wymagania dla typu ogłoszenia. W ofercie widocznej publicznie status ma wartość active, a publicationState ma wartość public.
Wymagany zakres listings:write
Parametry
| Nazwa | Miejsce | Typ | Wymagany | Opis |
|---|---|---|---|---|
id | path | string | Tak | min. znaków 1 · maks. znaków 120 |
If-Match | header | string | Tak | Ostatni ETag oferty zwrócony przez API. |
Idempotency-Key | header | string | Tak | UUID żądania. Ponów z tym samym kluczem w ciągu 7 dni. format uuid |
Treść żądania
Schemat PublishOrRenewInput
| Nazwa | Typ | Wymagany | Opis |
|---|---|---|---|
packageTier | "free" | "basic" | "plus" | "pro" | Nie | "free" | "basic" | "plus" | "pro" |
singlePromotionKeys | "refresh_bump" | "top_list" | "homepage" | "premium_map" | "hot_buyer_push"[] | Nie | maks. elementów 5 |
invoiceBilling | object | Nie | — |
JSON Schema
{
"$ref": "#/components/schemas/PublishOrRenewInput"
}Odpowiedzi
200 Opublikowany szkic lub przygotowana płatność.ETag- Wersja do nagłówka If-Match.
application/jsonSchemat MutationReceipt
| Nazwa | Typ | Wymagany | Opis |
|---|---|---|---|
id | string | Tak | — |
status | "draft" | "payment_required" | "active" | "expired" | "sold" | Tak | — |
publicationState | "public" | "pending" | "hidden" | Tak | — |
updatedAt | string | Tak | format date-time |
publicPath | string | null | Tak | — |
paymentPath | string | Nie | — |
payment | PaymentReceipt | Nie | — |
archiveFeedback | object | Nie | — |
JSON Schema
{
"$ref": "#/components/schemas/MutationReceipt"
}409 Błąd przetwarzania żądania.application/jsonSchemat object
| Nazwa | Typ | Wymagany | Opis |
|---|---|---|---|
code | string | Tak | — |
message | string | Tak | — |
requestId | string | Tak | — |
issues | object[] | Nie | — |
JSON Schema
{
"type": "object",
"required": [
"code",
"message",
"requestId"
],
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"requestId": {
"type": "string"
},
"issues": {
"type": "array",
"items": {
"type": "object"
}
}
}
}412 Błąd przetwarzania żądania.application/jsonSchemat object
| Nazwa | Typ | Wymagany | Opis |
|---|---|---|---|
code | string | Tak | — |
message | string | Tak | — |
requestId | string | Tak | — |
issues | object[] | Nie | — |
JSON Schema
{
"type": "object",
"required": [
"code",
"message",
"requestId"
],
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"requestId": {
"type": "string"
},
"issues": {
"type": "array",
"items": {
"type": "object"
}
}
}
}422 Błąd przetwarzania żądania.application/jsonSchemat object
| Nazwa | Typ | Wymagany | Opis |
|---|---|---|---|
code | string | Tak | — |
message | string | Tak | — |
requestId | string | Tak | — |
issues | object[] | Nie | — |
JSON Schema
{
"type": "object",
"required": [
"code",
"message",
"requestId"
],
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"requestId": {
"type": "string"
},
"issues": {
"type": "array",
"items": {
"type": "object"
}
}
}
}428 Błąd przetwarzania żądania.application/jsonSchemat object
| Nazwa | Typ | Wymagany | Opis |
|---|---|---|---|
code | string | Tak | — |
message | string | Tak | — |
requestId | string | Tak | — |
issues | object[] | Nie | — |
JSON Schema
{
"type": "object",
"required": [
"code",
"message",
"requestId"
],
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"requestId": {
"type": "string"
},
"issues": {
"type": "array",
"items": {
"type": "object"
}
}
}
}503 Błąd przetwarzania żądania.application/jsonSchemat object
| Nazwa | Typ | Wymagany | Opis |
|---|---|---|---|
code | string | Tak | — |
message | string | Tak | — |
requestId | string | Tak | — |
issues | object[] | Nie | — |
JSON Schema
{
"type": "object",
"required": [
"code",
"message",
"requestId"
],
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"requestId": {
"type": "string"
},
"issues": {
"type": "array",
"items": {
"type": "object"
}
}
}
}Pozostałe błędy API Błąd przetwarzania żądania.application/jsonSchemat object
| Nazwa | Typ | Wymagany | Opis |
|---|---|---|---|
code | string | Tak | — |
message | string | Tak | — |
requestId | string | Tak | — |
issues | object[] | Nie | — |
JSON Schema
{
"type": "object",
"required": [
"code",
"message",
"requestId"
],
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"requestId": {
"type": "string"
},
"issues": {
"type": "array",
"items": {
"type": "object"
}
}
}
}401 Brak prawidłowego klucza API.403 Brak zakresu wymaganego przez operację lub żądanie bez HTTPS na produkcji.429 Przekroczono limit zapytań. Sprawdź Retry-After.Powiązane schematy
PublishOrRenewInput
{
"type": "object",
"properties": {
"packageTier": {
"type": "string",
"enum": [
"free",
"basic",
"plus",
"pro"
]
},
"singlePromotionKeys": {
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"enum": [
"refresh_bump",
"top_list",
"homepage",
"premium_map",
"hot_buyer_push"
]
}
},
"invoiceBilling": {
"type": "object",
"properties": {
"recipientType": {
"type": "string",
"enum": [
"private",
"company"
]
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 180,
"pattern": "^[^\\p{Cc}\\p{Cf}]+$"
},
"nip": {
"type": "string",
"pattern": "^\\d{10}$"
},
"street": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[^\\p{Cc}\\p{Cf}]+$"
},
"buildingNumber": {
"type": "string",
"minLength": 1,
"maxLength": 30,
"pattern": "^[^\\p{Cc}\\p{Cf}]+$"
},
"apartmentNumber": {
"type": "string",
"minLength": 1,
"maxLength": 30,
"pattern": "^[^\\p{Cc}\\p{Cf}]+$"
},
"address": {
"type": "string",
"minLength": 1,
"maxLength": 220,
"pattern": "^[^\\p{Cc}\\p{Cf}]+$"
},
"postalCode": {
"type": "string",
"pattern": "^\\d{2}-\\d{3}$"
},
"city": {
"type": "string",
"minLength": 1,
"maxLength": 120,
"pattern": "^[^\\p{Cc}\\p{Cf}]+$"
},
"email": {
"type": "string",
"maxLength": 160,
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"phone": {
"type": "string",
"maxLength": 40,
"pattern": "^[\\d+\\s()-]+$"
}
},
"required": [
"recipientType",
"name",
"postalCode",
"city"
],
"additionalProperties": false
}
},
"additionalProperties": false
}MutationReceipt
{
"type": "object",
"required": [
"id",
"status",
"publicationState",
"updatedAt",
"publicPath"
],
"properties": {
"id": {
"type": "string"
},
"status": {
"enum": [
"draft",
"payment_required",
"active",
"expired",
"sold"
]
},
"publicationState": {
"enum": [
"public",
"pending",
"hidden"
]
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"publicPath": {
"type": [
"string",
"null"
]
},
"paymentPath": {
"type": "string"
},
"payment": {
"$ref": "#/components/schemas/PaymentReceipt"
},
"archiveFeedback": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"outcome": {
"enum": [
"sold",
"not_sold",
"other"
]
},
"recommendationScore": {
"type": [
"integer",
"null"
],
"minimum": 1,
"maximum": 10
},
"updatedAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"outcome",
"recommendationScore",
"updatedAt"
]
}
}
}PaymentReceipt
{
"type": "object",
"required": [
"id",
"amountCents",
"currency",
"status"
],
"properties": {
"id": {
"type": "string"
},
"amountCents": {
"type": "integer",
"minimum": 1
},
"currency": {
"type": "string"
},
"status": {
"type": "string"
}
}
}