propose_write
costs

Build an approval card to import product costs from a staged sheet. Call inspect_cost_import first: if it returned ready

Changed on

Build an approval card to import product costs from a staged sheet. Call inspect_cost_import first: if it returned ready_to_propose=true, call this with ONLY import_id — the mapping is already settled and passing columns can only make it worse. Otherwise pass just the answers to the questions inspect_cost_import listed (identifier_column, cost_column and/or currency). Returns a preview card the user approves; nothing is written until they do.

post/api/v1/tools/propose_cost_import

Request

  • Base URL
    https://app.magistry.io
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization codehttps://app.magistry.io/api/oauth/authorize
      Token URLhttps://app.magistry.io/api/oauth/token
      Scopescosts:write

Headers

Idempotency-Key, string

Optional; honoured when sent. A unique string you choose for this request; send the SAME key when retrying and the first answer is returned instead of writing twice (idempotent-replayed: true). The same key with other arguments is 409 idempotency_conflict. If the header and idempotency_key are both sent they must be equal.

Request body

object required
import_id, string uuid required
identifier_column, string

Only when inspect_cost_import asked which column identifies the product.

cost_column, string

Only when inspect_cost_import asked which column holds the unit cost.

currency, string

Only when inspect_cost_import asked. Pass the chosen option's value VERBATIM — either an ISO 4217 code, or the "convert:<ISO>" form, which converts the sheet's stated currency into <ISO> at the platform rate.

include_flagged_rows, boolean

Import rows the sheet itself flagged (a note saying CHECK / wrong / verify). Default false — they are left out and counted. Only pass true if the user, having been told what the note says, asks for them.

title_column, string

Manual override for the product title column.

sku_column, string

Manual override for the SKU column.

idempotency_key, string

Optional. A unique string you choose for this request. Send the SAME key when retrying after a timeout and Magistry returns the original outcome instead of performing the write twice. Reusing a key with different arguments is refused rather than replayed.

Response

Tool result

object required
ok, boolean required
result, unknown required

Changes

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    11 more changes in this revision