Skip to main content

JavaScript / TypeScript SDK

Use the JavaScript SDK when you want full control from Node.js, Deno, or Bun.

Run the local JavaScript example

Try the SDK against the mock AAP server with AAP_API_KEY=aap_demo_key and fake checkout data.
Install
quickstart.ts

Client

new AAP(config)

Methods

aap.search(options)

Returns matching offers and a session ID.

aap.recommend(options)

Record a recommendation. This is the attribution event.

aap.checkout(options)

Initiate checkout for a recommended offer.

aap.getSession(sessionId)

Get session details including recommendations and conversions.

aap.verifyCode(code)

Verify an AAP Code is authentic.

Mock conversion learning

The runnable SDK example reaches a mock checkout URL. To understand why checkout-link creation is separate from conversion recording, see Mock Conversion Artifact.

npm

GitHub