Skip to main content
cURL
Cost: Free.
Works while the extension is offline: this call uses only what Alura stores. See Chrome extension.
Needs the ads:write scope and the Etsy Ads workspace permission. A shop outside the workspace answers 404. Send Idempotency-Key to retry safely.

Save without overwriting

These are the settings of Alura’s Etsy Ads optimizer. A change here is what Alura’s Etsy Ads page uses, and a change there shows here. settings replaces the whole object, so read the settings first and send back the version you read, 0 when none were saved.

Authorizations

Authorization
string
header
required

An API key: Authorization: Bearer alura_sk_....

Headers

Idempotency-Key
string

Makes a retry safe: the same key with the same request within 24 hours returns the first result (with Idempotent-Replayed: true) instead of writing again. The same key with a different request is a 409 conflict; while the first request still runs, 409 idempotency_processing.

Required string length: 1 - 255

Query Parameters

shop_id
string

The Etsy shop ID of one of the workspace's connected shops; optional when the workspace has one. A shop outside the workspace is 404.

Pattern: ^[0-9]{1,20}$
Example:

"22841907"

Body

application/json
version
integer
required

The version you read: 0 when none were saved. A different stored version answers 409 settings_conflict with what is stored, and nothing is saved.

Required range: 0 <= x <= 2147483646
settings
object

The whole settings object to save (OptimizerSettings v1), snake_case as the GET answers it (camelCase keys are still taken, deprecated); it replaces what is stored.

Response

OK

object
string
required
Allowed value: "workspace.ads_optimizer_settings"
shop_id
string
required
settings
object | null
required

The saved settings; null when the shop has none saved (a preview then uses the default preset).

version
integer
required

The settings' version: 0 when none are saved, else bumped by 1 on every save, the app's and the API's.

Required range: x >= 0