Skip to content

Test your endpoints

This is step 7 of the sandbox tests. You give MarsX your sandbox endpoints and seed made-up data. MarsX then runs five tests against them, named R1 to R5, and emails you each result.

These tests are optional. Run them only if you host the four endpoints, as a safety net. Going live does not need them. Run them after the four endpoints work on your side. Host the four endpoints lists what to build.

  1. Build the four endpoints in your sandbox. Use made-up data only.

  2. Give MarsX your details in Concour. Open Developers, then Your endpoints. Enter the Base URL, the Token URL, the Client ID and the Client secret of one read-only OAuth client with the scope leads:read, then choose Save and check. See Give MarsX your details in Concour. The secret is saved and never shown again.

  3. Email the cursors and a contact. Email support@marsx.media one cursor value for each feed that always returns 410 (test R4), and a technical contact. Never email a secret, and never paste one into WhatsApp.

  4. Seed the data below. Seed it before you email. Keep it until MarsX confirms it has finished.

MarsX replies within 1 business day, Monday to Saturday, 08:00 to 20:00 WIB. The reply gives the date of the run. There is no out-of-hours line.

MarsX emails each result. If a test fails, fix your side and ask MarsX to run that test again. MarsX re-runs a single test on request. Keep the seed data until MarsX confirms.

# You prepare MarsX checks
R1 Do not push: a new lead, a deletion of a lead you no longer hold, a withdrawal below the stored revision It finds the lead in changes, the other two in privacy-events
R2 At least 1,001 changes sharing one updated_at (MarsX asks for 500 per page) None is lost or repeated when it restarts between pages
R3 An erased lead privacy-events lists it and leads/{id} gives 404
R4 One documented cursor per feed that always gives 410 privacy-events: connection stays restricted. changes: restart from the oldest
R5 A deletion older than your replay window, on a full privacy list (MarsX sends the file layout when it schedules R5) After recovery, the lead carries the marker

R1: the safety net finds what was not sent

Section titled “R1: the safety net finds what was not sent”

What to seed. Keep three things out of your push, so MarsX never receives them by sending:

  • A new lead. It appears in your changes feed.
  • The deletion of a lead you no longer hold. It appears in your privacy-events feed.
  • A withdrawal for a lead that MarsX holds at a higher revision. The withdrawal carries a lower source_revision than the stored lead. It appears in your privacy-events feed.

A pass. MarsX finds the new lead in changes and reads it with Lead lookup. It finds the other two in privacy-events and applies both, so both leads are restricted.

What to seed. At least 1,001 changes that share one updated_at. Use a different partner_lead_id for each. MarsX asks for 500 items a page, so this makes three pages. Keep one stable order, for example updated_at then a unique, increasing sequence number.

A pass. MarsX stops and restarts between pages, and no change is lost or repeated. If your order changes between calls, this test fails. See the cursor rules.

What to seed. A lead you have erased and no longer hold, with its erasure in your privacy-events feed.

A pass. privacy-events lists the erasure, and GET /v1/leads/{partner_lead_id} for that ID gives 404 to an authenticated caller.

What to give MarsX. One cursor value for each feed that always returns 410, documented in your sandbox. You send these values with your sandbox details. MarsX sends each one as the cursor of a read.

A pass.

  • privacy-events: MarsX gets 410 and keeps the connection’s leads restricted. Starting again from the oldest item does not lift the restriction.
  • changes: MarsX gets 410 and restarts from the oldest item you hold.

What to seed. A deletion older than your replay window. It is on your full privacy list, but no longer in privacy-events. MarsX sends the file layout when it schedules R5. Fill in withdraw and delete rows only, and send it as described in the cursor rules.

A pass. After recovery, the lead ID carries the privacy marker and is restricted. The connection restriction lifts only when recovery is proven.