{
  "info": {
    "name": "Motano API v1 — integration collection",
    "version": "1.0.0",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "Motano contract examples. The default variables target the local simulator with a synthetic key. When retrying the same write, replace the automatic UUID in Idempotency-Key with the value from the first attempt."
  },
  "variable": [
    {
      "key": "MOTANO_API_ORIGIN",
      "value": "http://127.0.0.1:3201",
      "type": "string"
    },
    {
      "key": "MOTANO_API_KEY",
      "value": "motano-docs-demo",
      "type": "string"
    },
    {
      "key": "MOTANO_LISTING_ID",
      "value": "listing-example",
      "type": "string"
    },
    {
      "key": "MOTANO_PHOTO_ID",
      "value": "photo-example",
      "type": "string"
    },
    {
      "key": "MOTANO_PAYMENT_ID",
      "value": "payment-example",
      "type": "string"
    },
    {
      "key": "MOTANO_CORRECTION_ID",
      "value": "correction-example",
      "type": "string"
    },
    {
      "key": "MOTANO_MAKE_ID",
      "value": "make-example",
      "type": "string"
    },
    {
      "key": "MOTANO_MODEL_ID",
      "value": "model-example",
      "type": "string"
    },
    {
      "key": "MOTANO_LISTING_ETAG",
      "value": "\"1111111111111111111111111111111111111111111111111111111111111111\"",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "Listings",
      "item": [
        {
          "name": "List listing types",
          "request": {
            "method": "GET",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/listing-types",
            "description": "Required scope listings:read",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              }
            ]
          }
        },
        {
          "name": "List your own listings",
          "request": {
            "method": "GET",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/listings?limit=25",
            "description": "Required scope listings:read",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              }
            ]
          }
        },
        {
          "name": "Create and submit a listing",
          "request": {
            "method": "POST",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/listings",
            "description": "Paid submissions prepare a checkout for confirmation in Motano. Requires the LISTING_API_PAYMENTS_ENABLED flag.\n\nRequired scope listings:write",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"listingTypeValue\": \"osobowe\",\n  \"formContractVersion\": 2,\n  \"title\": \"Toyota Corolla 1.8 Hybrid\",\n  \"price\": 59900,\n  \"description\": \"Toyota Corolla 1.8 Hybrid, rocznik 2020. Przykładowe ogłoszenie testowe.\",\n  \"make\": \"Toyota\",\n  \"model\": \"Corolla\",\n  \"year\": 2020,\n  \"mileage\": 95000,\n  \"fuelType\": \"hybrid\",\n  \"gearbox\": \"Automatyczna\",\n  \"driveType\": \"Na przednie koła\",\n  \"power\": 122,\n  \"bodyType\": \"Sedan\",\n  \"condition\": \"used\",\n  \"location\": \"Warszawa\",\n  \"voivodeship\": \"Mazowieckie\",\n  \"contactName\": \"Konto testowe\",\n  \"contactPhone\": \"+48 000 000 000\",\n  \"details\": {\n    \"offerMode\": \"sale\",\n    \"vin\": \"TEST0000000000000\",\n    \"registrationNumber\": \"TEST123\",\n    \"firstRegistrationDate\": \"2020-01-15\"\n  },\n  \"images\": [\n    \"photo-example-1\",\n    \"photo-example-2\",\n    \"photo-example-3\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get your own listing",
          "request": {
            "method": "GET",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/listings/{{MOTANO_LISTING_ID}}",
            "description": "Required scope listings:read",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              }
            ]
          }
        },
        {
          "name": "Update a listing",
          "request": {
            "method": "PATCH",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/listings/{{MOTANO_LISTING_ID}}",
            "description": "Required scope listings:write",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "If-Match",
                "value": "{{MOTANO_LISTING_ETAG}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"title\": \"Toyota Corolla 1.8 Hybrid — oferta testowa\",\n  \"price\": 58900\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Close a listing",
          "request": {
            "method": "POST",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/listings/{{MOTANO_LISTING_ID}}/close",
            "description": "Required scope listings:write",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "If-Match",
                "value": "{{MOTANO_LISTING_ETAG}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"outcome\": \"sold\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Create a listing draft",
          "request": {
            "method": "POST",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/listings/drafts",
            "description": "Required scope listings:write",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"listingTypeValue\": \"osobowe\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Duplicate a listing as a draft",
          "request": {
            "method": "POST",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/listings/{{MOTANO_LISTING_ID}}/duplicate",
            "description": "Required scope listings:write",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "If-Match",
                "value": "{{MOTANO_LISTING_ETAG}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Submit a draft for publication",
          "request": {
            "method": "POST",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/listings/{{MOTANO_LISTING_ID}}/publish",
            "description": "Paid publication prepares a checkout for confirmation in Motano. Requires the LISTING_API_PAYMENTS_ENABLED flag.\n\nRequired scope listings:write",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "If-Match",
                "value": "{{MOTANO_LISTING_ETAG}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"packageTier\": \"free\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Renew a listing",
          "request": {
            "method": "POST",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/listings/{{MOTANO_LISTING_ID}}/renew",
            "description": "Paid renewal prepares a checkout for confirmation in Motano. Requires the LISTING_API_PAYMENTS_ENABLED flag.\n\nRequired scope listings:write",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "If-Match",
                "value": "{{MOTANO_LISTING_ETAG}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"packageTier\": \"free\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Prepare a promotion purchase",
          "request": {
            "method": "POST",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/listings/{{MOTANO_LISTING_ID}}/promotions",
            "description": "Prepares a checkout for confirmation in Motano. Requires the LISTING_API_PAYMENTS_ENABLED flag.\n\nRequired scope listings:write",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "If-Match",
                "value": "{{MOTANO_LISTING_ETAG}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"singlePromotionKeys\": [\n    \"top_list\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Preview without saving",
          "request": {
            "method": "POST",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/listings/preview",
            "description": "Required scope listings:write",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"listing\": {\n    \"listingTypeValue\": \"osobowe\",\n    \"title\": \"Toyota Corolla 1.8 Hybrid\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Preview a saved listing",
          "request": {
            "method": "GET",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/listings/{{MOTANO_LISTING_ID}}/preview",
            "description": "Required scope listings:read",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              }
            ]
          }
        },
        {
          "name": "Submit feedback after archiving",
          "request": {
            "method": "POST",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/listings/{{MOTANO_LISTING_ID}}/archive-feedback",
            "description": "Required scope listings:write",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "If-Match",
                "value": "{{MOTANO_LISTING_ETAG}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"outcome\": \"sold\",\n  \"recommendationScore\": 8\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Photos",
      "item": [
        {
          "name": "Reserve a photo upload",
          "request": {
            "method": "POST",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/media",
            "description": "Required scope media:write",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"contentType\": \"image/jpeg\",\n  \"sizeBytes\": 124000,\n  \"category\": \"osobowe\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get photo status",
          "request": {
            "method": "GET",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/media/{{MOTANO_PHOTO_ID}}",
            "description": "Required scope media:write",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              }
            ]
          }
        },
        {
          "name": "Download a private photo preview",
          "request": {
            "method": "GET",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/media/{{MOTANO_PHOTO_ID}}/preview",
            "description": "Private preview of a processed photo owned by the account.\n\nRequired scope listings:read",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              }
            ]
          }
        },
        {
          "name": "Complete a photo upload",
          "request": {
            "method": "POST",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/media/{{MOTANO_PHOTO_ID}}/complete",
            "description": "Required scope media:write",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              }
            ]
          }
        }
      ]
    },
    {
      "name": "Catalogs and CEPiK",
      "item": [
        {
          "name": "List makes",
          "request": {
            "method": "GET",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/catalog/makes?scope=passenger",
            "description": "Required scope listings:read",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              }
            ]
          }
        },
        {
          "name": "List models",
          "request": {
            "method": "GET",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/catalog/models?scope=passenger&makeId={{MOTANO_MAKE_ID}}",
            "description": "Required scope listings:read",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              }
            ]
          }
        },
        {
          "name": "List generations",
          "request": {
            "method": "GET",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/catalog/generations?scope=passenger&modelId={{MOTANO_MODEL_ID}}",
            "description": "Required scope listings:read",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              }
            ]
          }
        },
        {
          "name": "List equipment and options",
          "request": {
            "method": "GET",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/catalog/equipment?scope=passenger",
            "description": "Required scope listings:read",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              }
            ]
          }
        },
        {
          "name": "List packages and promotions",
          "request": {
            "method": "GET",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/catalog/promotions",
            "description": "Required scope listings:read",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              }
            ]
          }
        },
        {
          "name": "Look up vehicle data in CEPiK",
          "request": {
            "method": "POST",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/catalog/cepik",
            "description": "Requires the LISTING_API_CEPIK_ENABLED flag. If disabled, the API returns 503 with CEPIK_DISABLED.\n\nRequired scope listings:write",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"vin\": \"TEST0000000000000\",\n  \"registrationNumber\": \"TEST123\",\n  \"firstRegistrationDate\": \"2020-01-15\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Browse and search parts categories",
          "request": {
            "method": "GET",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/catalog/part-categories?listingTypeValue=czesci-samochodowe&q=chlodnic&limit=20",
            "description": "Parts category tree and search. Use either q or path.\n\nRequired scope listings:read",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              }
            ]
          }
        },
        {
          "name": "Suggest addresses",
          "request": {
            "method": "POST",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/catalog/addresses",
            "description": "Address suggestions in Poland.\n\nRequired scope listings:read",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"query\": \"Warszawa Marszałkowska\",\n  \"limit\": 3\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Compare a listing price",
          "request": {
            "method": "GET",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/catalog/price-barometer?category=osobowe&make=Toyota&model=Corolla&price=59900",
            "description": "Price comparison against similar listings for sale.\n\nRequired scope listings:read",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              }
            ]
          }
        }
      ]
    },
    {
      "name": "Statistics",
      "item": [
        {
          "name": "List statistics filters",
          "request": {
            "method": "GET",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/statistics/filters",
            "description": "Filter values for the owner’s listings.\n\nRequired scope statistics:read",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              }
            ]
          }
        },
        {
          "name": "Get seller statistics",
          "request": {
            "method": "POST",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/statistics/listings",
            "description": "Summary and one page of the owner’s statistics.\n\nRequired scope statistics:read",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"range\": {\n    \"preset\": \"30\"\n  },\n  \"filters\": {\n    \"status\": \"active\"\n  },\n  \"page\": 1,\n  \"limit\": 25\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get listing statistics",
          "request": {
            "method": "GET",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/statistics/listings/{{MOTANO_LISTING_ID}}?preset=30",
            "description": "Detailed statistics for the owner’s listing.\n\nRequired scope statistics:read",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              }
            ]
          }
        },
        {
          "name": "Export statistics as CSV",
          "request": {
            "method": "POST",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/statistics/export",
            "description": "CSV download matching the selected filters.\n\nRequired scope statistics:read",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"range\": {\n    \"preset\": \"30\"\n  },\n  \"filters\": {\n    \"status\": \"active\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Payments and invoices",
      "item": [
        {
          "name": "List your payments",
          "request": {
            "method": "GET",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/payments?limit=20",
            "description": "History of paid and refunded payments, including paths to documents.\n\nRequired scope payments:read",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              }
            ]
          }
        },
        {
          "name": "Get saved billing details",
          "request": {
            "method": "GET",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/payments/invoice-billing",
            "description": "Billing details saved with the most recent paid purchase that contains them.\n\nRequired scope payments:read",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              }
            ]
          }
        },
        {
          "name": "Get checkout status",
          "request": {
            "method": "GET",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/payments/{{MOTANO_PAYMENT_ID}}/checkout",
            "description": "The status of a payment as recorded by Motano. Use the payment.id returned by the listing operation.\n\nRequired scope payments:read",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              }
            ]
          }
        },
        {
          "name": "Retry invoice issuance",
          "request": {
            "method": "POST",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/payments/{{MOTANO_PAYMENT_ID}}/invoice/retry",
            "description": "Retries invoice issuance for a paid payment using the saved billing details.\n\nRequired scope invoices:retry",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Download an invoice",
          "request": {
            "method": "GET",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/payments/{{MOTANO_PAYMENT_ID}}/invoice?format=xml",
            "description": "Download the owner’s accepted invoice.\n\nRequired scope payments:read",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              }
            ]
          }
        },
        {
          "name": "Download an invoice correction",
          "request": {
            "method": "GET",
            "url": "{{MOTANO_API_ORIGIN}}/api/v1/payments/{{MOTANO_PAYMENT_ID}}/corrections/{{MOTANO_CORRECTION_ID}}?format=xml",
            "description": "Download the owner’s accepted invoice correction.\n\nRequired scope payments:read",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{MOTANO_API_KEY}}"
              }
            ]
          }
        }
      ]
    }
  ]
}
