Lead lookup
GET /v1/leads/{partner_lead_id} returns what you would send as the latest event for one lead. MarsX calls it when the feeds show a lead it lacks, or holds at an older revision. The answer has the same data shape as a push event.
URL-encode the ID in the path. Use the access token from your token URL.
Three answers
Section titled “Three answers”| Lead state at your end | Answer |
|---|---|
| Live | 200 with the full current state |
| Withdrawn or restricted | 200 with the withdrawal form: identity and privacy request fields only |
| Erased and no longer held | 404, for an authenticated caller only |
A live lead
Section titled “A live lead”A live lead gets 200 with the full current state. The answer always carries source_revision and updated_at, because MarsX compares revisions. Use record_action new until the lead has changed, then update.
GET /v1/leads/SRC-TEST-0001Authorization: Bearer <access_token>Accept: application/json{ "partner_lead_id": "SRC-TEST-0001", "partner_customer_id": "SRC-CUST-TEST-0001", "source_revision": 1, "record_action": "new", "created_at": "2026-10-01T09:15:00+07:00", "updated_at": "2026-10-01T09:15:00+07:00", "customer_name": "Contoh Pelanggan", "phone": "+6280000000001", "email": "contoh.pelanggan@contoh.example", "model_interest": "Model A", "purchase_timeframe": "3 bulan ke depan", "test_drive_requested": "N", "enquiry_notes": "Ingin meminta penawaran untuk Model A.", "customer_province": "Jawa Barat", "customer_city": "Kota Bandung", "preferred_dealer_code": "D0001", "source_channel": "chat", "campaign": "campaign-test", "session_id": "SESSION-TEST-0001", "consent_reference": "CONSENT-TEST-0001", "contact_consent": "yes", "consent_time": "2026-10-01T09:14:40+07:00", "notice_version": "NOTICE-TEST-1", "consent_purpose": "sales_follow_up", "ai_intent_label": "ingin_penawaran", "ai_summary": "Pelanggan meminta penawaran Model A."}The body is the data object only, not the event envelope with type and timestamp. The fields are in Lead fields.
A withdrawn or restricted lead
Section titled “A withdrawn or restricted lead”A lead with a withdrawal or restriction gets 200 with identity and privacy request fields only. It carries no contact, interest or profile data. It carries the withdrawal’s own source_revision and updated_at, not those of the last lead update.
GET /v1/leads/SRC-TEST-0001Authorization: Bearer <access_token>Accept: application/json{ "partner_lead_id": "SRC-TEST-0001", "source_revision": 3, "record_action": "withdraw", "created_at": "2026-10-01T09:15:00+07:00", "updated_at": "2026-10-04T15:00:00+07:00", "request_type": "withdraw_consent", "request_time": "2026-10-04T14:59:30+07:00", "request_reference": "PRIV-TEST-0001"}If you still hold an erased lead as a suppression record, answer 200 with the same form and record_action delete. Use 404 only when you hold nothing for that ID.
An erased lead you no longer hold
Section titled “An erased lead you no longer hold”Answer 404. MarsX finds the erasure in privacy-events.
GET /v1/leads/SRC-TEST-0007Authorization: Bearer <access_token>Accept: application/json{ "type": "urn:marsx:problem:not-found", "title": "The lead was not found", "status": 404}MarsX acts on the status code, not on the problem type. You may use your own problem type.

