Referencja API

Dostęp produkcyjny zamknięty · 37 operacji

Odnów ogłoszenie

POST/api/v1/listings/{id}/renew

Odnowienie płatne przygotowuje koszyk do potwierdzenia w portalu. Wymaga włączonej flagi LISTING_API_PAYMENTS_ENABLED.

Możesz wznowić ogłoszenie wygasłe lub odnowić aktywne w ciągu dwóch dni przed wygaśnięciem.

Wymagany zakres listings:write

Przejdź do przykładu

Parametry

NazwaMiejsceTypWymaganyOpis
idpathstringTakmin. znaków 1 · maks. znaków 120
If-MatchheaderstringTakOstatni ETag oferty zwrócony przez API.
Idempotency-KeyheaderstringTakUUID żądania. Ponów z tym samym kluczem w ciągu 7 dni. format uuid

Treść żądania

Schemat PublishOrRenewInput
NazwaTypWymaganyOpis
packageTier"free" | "basic" | "plus" | "pro"Nie"free" | "basic" | "plus" | "pro"
singlePromotionKeys"refresh_bump" | "top_list" | "homepage" | "premium_map" | "hot_buyer_push"[]Niemaks. elementów 5
invoiceBillingobjectNie—
JSON Schema
{
  "$ref": "#/components/schemas/PublishOrRenewInput"
}

Odpowiedzi

200 Odnowione ogłoszenie lub przygotowana płatność.
ETag
Wersja do nagłówka If-Match.
application/json
Schemat MutationReceipt
NazwaTypWymaganyOpis
idstringTak—
status"draft" | "payment_required" | "active" | "expired" | "sold"Tak—
publicationState"public" | "pending" | "hidden"Tak—
updatedAtstringTakformat date-time
publicPathstring | nullTak—
paymentPathstringNie—
paymentPaymentReceiptNie—
archiveFeedbackobjectNie—
JSON Schema
{
  "$ref": "#/components/schemas/MutationReceipt"
}
409 Błąd przetwarzania żądania.
application/json
Schemat object
NazwaTypWymaganyOpis
codestringTak—
messagestringTak—
requestIdstringTak—
issuesobject[]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/json
Schemat object
NazwaTypWymaganyOpis
codestringTak—
messagestringTak—
requestIdstringTak—
issuesobject[]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/json
Schemat object
NazwaTypWymaganyOpis
codestringTak—
messagestringTak—
requestIdstringTak—
issuesobject[]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/json
Schemat object
NazwaTypWymaganyOpis
codestringTak—
messagestringTak—
requestIdstringTak—
issuesobject[]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/json
Schemat object
NazwaTypWymaganyOpis
codestringTak—
messagestringTak—
requestIdstringTak—
issuesobject[]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/json
Schemat object
NazwaTypWymaganyOpis
codestringTak—
messagestringTak—
requestIdstringTak—
issuesobject[]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.

Obsługa błędów i limitów ↗

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"
    }
  }
}