Matchai Docs

Reorder photosComing soon

Puts the gallery in a new order. Send every current media id: this never adds or removes media, and a list that does not match the gallery is refused with 422.

Coming soon. This is documented ahead of launch so you can plan your integration; it is not available yet.
PUT
/listings/{listing_id}/media

Coming soon. Puts the gallery in a new order. Send every current media id: this never adds or removes media, and a list that does not match the gallery is refused with 422.

Scopes: listings:write

Pricing: Included with the connection.

Authorization

headerAuthorizationBearer <matchai_<base62>>

A personal API key, sent as Authorization: Bearer matchai_…. Create keys in Matchai under Settings → Connectors → Advanced (for developers). A key starts with matchai_ followed by letters and digits, carries the scopes chosen when it was created, and can be revoked at any time. Keys reach only the account that created them: to serve other professionals, use Connect with Matchai.

Scope: listings:write

Path Parameters

listing_id*string

Listing id, or its slug.

Length1 <= length <= 200

Request Body

application/json
  1. body
media_ids*array<>

EVERY current media id, in the new order. This never adds or removes media; a list that does not match the gallery returns 422.

Items1 <= items <= 60

Response Body

All media, in the new order.

application/json
  1. response

Every photo and video of the listing, in gallery order.

data*array<>

In order.

Example Request
curl -X PUT 'https://api.matchai.co/v1/listings/string/media' \  -H 'Content-Type: application/json' \  -d '{  "media_ids": [    "string"  ]}'
Example Response
{  "data": [    {      "id": "string",      "listing_id": "string",      "type": "image",      "url": "http://example.com",      "position": 0,      "zone": "gallery",      "is_cover": true,      "edit": {        "kind": "string",        "edited_from_media_id": "string",        "original_available": true      },      "size_bytes": 0,      "uploaded_at": "2019-08-24T14:15:22Z"    }  ]}