How to Create and Publish a Listing
Section titled “How to Create and Publish a Listing”This guide outlines the process of creating an ad using the system, based on the provided sequence diagram. Please pay close attention to the IDs you receive, as they are crucial for subsequent steps.
Prerequisites
You will need your Imprint UUID to begin. See how to create it in the Specification section.
1. Create a Listing
Section titled “1. Create a Listing”- Send a
POSTrequest to the/listingendpoint. - The API will return the Listing UUID. Store this UUID, as you will need it for future steps.
2. Request a Media Ticket
Section titled “2. Request a Media Ticket”- Send a
POSTrequest to the/mediaendpoint. - The API will respond with a unique Ticket UUID and a Presigned URL for uploading your image.
- Note: This Ticket UUID has an expiration date; use it before it expires.
3. Upload the Image
Section titled “3. Upload the Image”- Use the Presigned URL to upload your image to the designated storage.
- This is a direct upload from your system to the storage service; the API is not involved in the actual file transfer.
4. Add Media to the Listing
Section titled “4. Add Media to the Listing”- Send a
PUTrequest to/listing/{listing_uuid}/media. - Include the Ticket UUID in the request payload.
- A Ticket UUID can only be used once successfully.
5. Publish the Listing
Section titled “5. Publish the Listing”- Send a
POSTrequest to/listing/{listing_uuid}/publication. - Include the Imprint UUID and any necessary location details in the payload.
- The API will acknowledge the request, initiate asynchronous ad creation, and return a Publication UUID.
6. Check Publication Status (Optional but Recommended)
Section titled “6. Check Publication Status (Optional but Recommended)”Once the publication is validated, the ad will be visible on Kleinanzeigen. Use these endpoints to monitor progress:
- Get Listing Information:
GET /listing/{listing_uuid}. - Get All Publications:
GET /listing/{listing_uuid}/publications(find statuses and associated imprints). - Get Specific Publication:
GET /listing/{listing_uuid}/publication/{publication_uuid}.
Important Notes
- ID Management: Keep track of your Listing UUID, Imprint UUID, and Publication UUIDs. The Listing UUID is essential for managing your ads.
- Asynchronous Processing: Ad validation may occur after you receive the initial publication response. Use the status check steps to monitor progress.
- API Details: This guide provides the general flow; refer to specific API documentation for request formats and required fields.