ListBridge

Docs · API reference

Listings

Create, list, update and delete listings for a connected Leboncoin account.

Create a listing

POST /api/v1/accounts/{account_id}/listings

Required fields: title (≤255 chars), description (≤5000 chars), price (decimal, > 0), category_id (opaque Leboncoin category id), location.city, location.zipcode and photo_urls (1 to 10 public image URLs, max 10 MB per photo, JPEG/PNG/WEBP). location.lat and location.lng are optional but must be supplied together. attributes carries category-specific fields (brand, condition, size, …) validated against the Leboncoin category schema — unknown keys are dropped, missing required fields and out-of-vocabulary values fail with 422 validation_failed.

request body
{
  "title": "Nike Air Max 90",
  "description": "Original pair in very good condition",
  "price": 89,
  "currency": "EUR",
  "category_id": "22",
  "location": {
    "city": "Paris",
    "zipcode": "75011"
  },
  "attributes": {
    "clothing_type": "1",
    "clothing_condition": "3",
    "clothing_color": "bleu"
  },
  "photo_urls": [
    "https://cdn.example.com/photo-1.jpg"
  ]
}

Requires an Idempotency-Key header. Returns 201 Created once the marketplace confirms the ad is live.

201 · published
{
  "id": "c1b2a3d4-0000-4000-8000-000000000000",
  "marketplace": "leboncoin",
  "marketplace_listing_id": "2938",
  "status": "published",
  "external_url": "https://www.leboncoin.fr/mode/2938.htm",
  "job_id": "35aa25e4-..."
}
422 · validation failed
{
  "error": {
    "code": "validation_failed",
    "message": "The given data was invalid.",
    "details": {
      "photo_urls": ["The photo urls field must not have more than 10 items."]
    }
  },
  "job_id": "35aa25e4-..."
}

A submit can be accepted while the marketplace confirmation is still in progress. This returns 503 with error.code: "publication_pending" and retryable: true — do not resubmit; either poll GET /api/v1/jobs/{job_id} or wait for listing.published once confirmation lands.

503 · confirmation in progress
{
  "id": "c1b2a3d4-0000-4000-8000-000000000000",
  "marketplace": "leboncoin",
  "marketplace_listing_id": "2938",
  "status": "publishing",
  "step": "submit",
  "retryable": true,
  "upstream_status": null,
  "error": {
    "code": "publication_pending",
    "message": "The listing was submitted and is awaiting marketplace confirmation."
  },
  "job_id": "35aa25e4-..."
}

List account listings

GET /api/v1/accounts/{account_id}/listings

Accepts limit (1–100, default 20). In test mode this lists the sandbox listings ListBridge tracks locally; in live mode it reflects the current state on the marketplace. id (the ListBridge UUID) is only present for listings ListBridge has a local record for.

200 · listings
{
  "data": [
    {
      "id": "c1b2a3d4-0000-4000-8000-000000000000",
      "marketplace_listing_id": "2938",
      "title": "Nike Air Max 90",
      "status": "published",
      "external_url": "https://www.leboncoin.fr/mode/2938.htm"
    }
  ]
}

Update a listing

PATCH /api/v1/accounts/{account_id}/listings/{listing_id}

title, description, price, photo_urls, attributes and shipping are mutable — only the fields you send are changed. category_id is immutable on a live ad: send it only to confirm the current category, a mismatch returns 422 validation_failed steering you to delist and republish. Requires an Idempotency-Key header.

200 · updated
{
  "id": "c1b2a3d4-0000-4000-8000-000000000000",
  "marketplace": "leboncoin",
  "marketplace_listing_id": "2938",
  "status": "published",
  "external_url": "https://www.leboncoin.fr/mode/2938.htm",
  "job_id": "35aa25e4-..."
}
422 · category changed
{
  "error": {
    "code": "validation_failed",
    "message": "The given data was invalid.",
    "details": {
      "category_id": ["The listing category cannot be changed. Delist and republish to change the category."]
    }
  },
  "job_id": "35aa25e4-..."
}

Delete a listing

DELETE /api/v1/accounts/{account_id}/listings/{listing_id}

Idempotent — repeating the same request after a confirmed delete returns the same deleted result. Requires an Idempotency-Key header and emits listing.deleted.

200 · deleted
{
  "id": "c1b2a3d4-0000-4000-8000-000000000000",
  "marketplace": "leboncoin",
  "marketplace_listing_id": "2938",
  "status": "deleted",
  "job_id": "35aa25e4-..."
}

Listing-specific errors

validation_failed 422 · payload or category attributes rejected, see `details`
publication_pending 503 · submit accepted, confirmation in progress — retryable, do not resubmit
location_unavailable 503 · the seller city/zipcode could not be resolved — retryable
upstream_error 502/503 · transient upstream failure — retryable when `retryable: true`
delist_failed 422 · the delete could not be confirmed
listing_not_found 404 · no matching listing for this account

See Errors for the shared envelope shape.

In test mode every listing action runs entirely against ListBridge's sandbox — nothing is submitted to Leboncoin. See Sandbox for the full test-mode contract.