Authentication
A company administrator creates an integration in the application, grants it authorized data by domain and field group, and creates a client. There are two ways to authenticate requests; both are sent as Authorization: Bearer.
OAuth 2.0, client credentials (recommended)
POST https://daas.masnet.com/api/v1/integrations/oauth/token with Content-Type: application/x-www-form-urlencoded. The client authenticates with client_secret_basic (Authorization: Basic) or with client_id and client_secret in the body, but not both at once. The client_id has the form mkc_ followed by 24 hexadecimal characters and the secret mks_ followed by 43 characters. Only grant_type=client_credentials is supported.
POST /api/v1/integrations/oauth/token HTTP/1.1
Host: daas.masnet.com
Authorization: Basic <base64(client_id:client_secret)>
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials&scope=read:contracts%20read:guarantees{
"access_token": "<jwt>",
"token_type": "Bearer",
"expires_in": 900,
"scope": "read:contracts read:guarantees"
}- The token is a 15-minute JWT. There are no refresh tokens: request a new one when it expires.
scopeis optional. The granted scope is the intersection between what you request and the data authorized for the integration; if the intersection is empty, the response is400 invalid_scope.- Errors at this endpoint follow RFC 6749:
{ "error": "...", "error_description": "..." }. An invalid or revoked client responds401 invalid_clientwithWWW-Authenticate: Basic realm="masnet-integrations", without distinguishing the cause. - The endpoint accepts 60 requests per minute per IP address and, after repeated failures, temporarily blocks that address (
429withRetry-After). - RFC 8414 metadata is at
/.well-known/oauth-authorization-serverand the public keys that verify the tokens at/jwks.json, both under the same base.
API key
For tools without OAuth: Authorization: Bearer mk_live_… in a production integration or mk_test_… in a test one. The value is shown only once at creation. By default it expires after 365 days.
Scopes and authorized data
A scope enables a domain, but the fields returned depend on the granted groups (public, business, confidential, people). Revoking the permission makes the API respond 403 immediately.
| Family | Scopes |
|---|---|
| Read | read:opportunities, read:tenders, read:bids, read:awards, read:contracts, read:guarantees, read:deadlines, read:documents, read:catalog, read:prices, read:exports, read:events, read:audit, read:communications, read:surveys, read:price_requests, read:clients, read:sales_portfolios, read:business_lines, read:buyers |
| Write | write:catalog, write:prices, write:communications, write:surveys, write:price_requests, write:clients, write:sales_portfolios. The catalog and price rules accept writes (catalog operations), as do clients and portfolios (client and portfolio operations), Communications and Surveys (their own APIs, with different routes and rules). write:price_requests only answers the price requests the channel integration receives, for tenders (guide) or for framework agreements (framework agreement requests). The other domains are read-only. A write scope does not replace the read scope of the same domain, and the data permission of the integration still limits what can be written. |
read:events enables the events log; read:audit the user actions log, which also requires a declaration by the company administrator.
Resources
Each resource is read with GET on the collection and GET …/{id} on the item, except the buyers master list, which is only read whole. Purchase orders and milestones belong to the contracts domain; product groups and competitor brands, to catalog; sales scopes and client assignments, to sales_portfolios.
| Collection | Scope | Filters |
|---|---|---|
https://daas.masnet.com/api/v1/integrations/data/bids | read:bids | tender_code, status (draft, ready, submitting, portal_draft, submitted, failed, portal_deleted, abandoned), include_deleted |
https://daas.masnet.com/api/v1/integrations/data/awards | read:awards | tender_code, state (detected, confirmed, dismissed) |
https://daas.masnet.com/api/v1/integrations/data/contracts | read:contracts | contract_code, tender_code, buyer_rut, status, ends_before, ends_after |
https://daas.masnet.com/api/v1/integrations/data/purchase-orders | read:contracts | po_code, contract_id, link_state (suggested, confirmed, rejected) |
https://daas.masnet.com/api/v1/integrations/data/guarantees | read:guarantees | status, expires_before, expires_after, tender_code, issuer_id, include_deleted |
https://daas.masnet.com/api/v1/integrations/data/opportunities | read:opportunities | tender_code, stage, decision (go, no_go, defer), business_line_id, include_deleted |
https://daas.masnet.com/api/v1/integrations/data/milestones | read:contracts | contract_id, type, status, planned_before, planned_after, include_deleted |
https://daas.masnet.com/api/v1/integrations/data/deadlines | read:deadlines | entity_id, kind, status (scheduled, done, cancelled, not_applicable), due_before, due_after |
https://daas.masnet.com/api/v1/integrations/data/catalog-items | read:catalog | is_active (true, false), internal_code |
https://daas.masnet.com/api/v1/integrations/data/price-rules | read:prices | catalog_id, is_active (true, false) |
https://daas.masnet.com/api/v1/integrations/data/clients | read:clients | status (active, archived), origin (manual, system, both), market_class (client, bidder, potential), administered (true, false), rut, internal_code |
https://daas.masnet.com/api/v1/integrations/data/client-groups | read:clients | is_active (true, false) |
https://daas.masnet.com/api/v1/integrations/data/sales-portfolios | read:sales_portfolios | status (active, archived) |
https://daas.masnet.com/api/v1/integrations/data/sales-scopes | read:sales_portfolios | No own filters |
https://daas.masnet.com/api/v1/integrations/data/client-assignments | read:sales_portfolios | client_id, owner_kind (user, team), owner_team_id. No updated_since |
https://daas.masnet.com/api/v1/integrations/data/product-groups | read:catalog | is_active (true, false) |
https://daas.masnet.com/api/v1/integrations/data/competitor-marks | read:catalog | catalog_id, status (active, retired), supplier_rut |
https://daas.masnet.com/api/v1/integrations/data/business-lines | read:business_lines | status (active, inactive), include_deleted |
https://daas.masnet.com/api/v1/integrations/data/buyers | read:buyers | No own filters. No GET …/{id} |
All collections accept limit and cursor, and all except client-assignments accept updated_since (RFC 3339 date). An unknown parameter is rejected with 400 invalid_parameter: the company is never a parameter, it is derived from the credential. The identifiers of catalog-items, price-rules, clients, client-groups, sales-portfolios, client-assignments, product-groups, competitor-marks and buyers are decimal integers as text; the others, UUIDs. An object of another company or a nonexistent one responds 404.
clients lists the whole portfolio of the company, active and archived, as My Clients in Masnet: with administered=true it keeps the clients the company added or already managed, and with market_class those of one market class. The classification and the market figures (market) are calculated by Masnet: their changes do not emit events and are read with updated_since. Private client groups of a person are not listed and their identifier responds 404.
Returned objects have the same shape as data.object of events; see the schemas.
Member lists
The clients of a client group and those of a portfolio have no identity of their own: a change is reported with an event of the container (change: members_changed) and the full list is read here, with the same scope as the container.
| List | Scope | Fields of each member |
|---|---|---|
https://daas.masnet.com/api/v1/integrations/data/client-groups/{id}/clients | read:clients | business: client_id, is_primary, sort_order and added_at. people: added_by. |
https://daas.masnet.com/api/v1/integrations/data/sales-portfolios/{id}/clients | read:sales_portfolios | business: client_id, source_group_id and added_at. people: added_by. |
- They accept only
limit(100 by default, maximum 500) andcursor. They are ordered byclient_idand do not acceptupdated_since: a member that leaves is deleted, so reconciliation is the full list. - The cursor only works for the container that issued it; one from another container responds
400 invalid_parameter. - A container that does not exist, belongs to another company, was deleted, or is a private group responds
404. - The people of a portfolio come in the portfolio object (
people, with thepeoplegroup), and those of a business line inmembers.
Pagination and conditional reads
limit: 100 by default, maximum 500.- The response is
{ "data": […], "next_cursor": "…" | null, "has_more": true | false }. To continue, repeat the request withcursor=<next_cursor>and the same filters. - The cursor is opaque, valid for 24 hours and works only with the filters it was issued for; another filter responds
400, an expired one410 cursor_expired. If the data permission changes mid-traversal, it responds410 cursor_scope_changed: restart the traversal. A permission change does not mean objects were deleted. - Deletions: resources with soft deletion (
bids,guarantees,opportunities,milestonesandbusiness-lines) are omitted by default; withinclude_deleted=truethey appear withdeleted_at. Reading a deleted object by identifier responds410 gonewithdeleted_atfor 30 days; afterwards,404. - Single reads: the response includes
ETag; send it back inIf-None-Matchto receive304if it did not change.
Initial load and synchronization
- Note the time of the first event you receive by webhook.
- Traverse each collection without
updated_sinceuntilhas_moreisfalse, and the member list of each client group and each portfolio. - Apply the events with a
sequencegreater than the version you loaded.
Events log
GET https://daas.masnet.com/api/v1/integrations/data/events with the read:events scope returns the envelopes of the last 30 days, newest first, with the same format and field groups as webhooks and only for the authorized domains. It serves to reconcile after an outage or for a middleware without a public endpoint.
typeandsubject(exact filters),sinceanduntil(RFC 3339),limitandcursor.limit: 50 by default, maximum 200. Response:data,next_cursorandhas_more.- A cursor older than the retention responds
410 cursor_expired: reload with the data API. A malformed cursor responds400 invalid_cursor. - An event is obtained with
GET …/data/events/{id}; a foreign or unauthorized event responds404. A body that does not fit in a list is omitted from it. - A routed event, such as a tender or framework agreement price request, is readable only by the integration it is routed to. Another integration of the company does not see it in the list, even with the same domain, and by id it gets
404, the same as for an event that does not exist.
User actions log
GET https://daas.masnet.com/api/v1/integrations/data/audit/actions with read:audit returns batches of the actions log by numeric cursor. It requires the administrator to declare that the company informed its users of the monitoring; without it, it responds 403 audit_declaration_required. Parameters: after_seq (non-negative integer, 0 by default), limit (1 to 50, 50 by default), since, until, actor, channel, action, origin and result. Name, email, IP and user agent are returned only with the people group. An unknown or out-of-range parameter responds 400 invalid_parameter.
{
"data": [
{
"batch": {
"seq": 1204,
"id": "<batch uuid>",
"from": "2026-11-04T13:02:11.482913Z",
"to": "2026-11-04T13:41:50.120377Z",
"count": 38,
"sealed_at": "2026-11-04T13:45:00.015Z"
},
"actions": [ { "id": "<uuid>", "action": "audit.export_read", "result": "ok", "received_at": "2026-11-04T13:30:02.771Z", "…": "…" } ]
},
{
"batch": { "seq": 1205, "id": "<batch uuid>", "from": "…", "to": "…", "count": 41, "sealed_at": "…" },
"actions": []
}
],
"next_after_seq": 1205,
"has_more": true
}- Each element of
datais a sealed batch, in ascendingseqorder:batch(seq,id,fromandtoas the reception range of its actions,countas the size of the sealed batch, andsealed_at) andactions. limitcounts batches, not actions: a page carries up tolimitbatches with all of their actions.- To continue, repeat the request with
after_seq=<next_after_seq>and the same filters.next_after_seqis theseqof the last batch on the page. The walk ends whenhas_moreisfalse; the end is marked byhas_more, not by the absence ofnext_after_seq. - The
actor,channel,action,originandresultfilters trim the actions of each batch, not the batches: a batch with no matches arrives withactions: []so that the cursor advances, andactionsmay hold fewer elements thancount.sinceanduntilfilter by reception time and also discard the batches that fall outside the interval. - If there are no batches after
after_seq, the response is{ "data": [], "next_after_seq": null, "has_more": false }. Keep the lastafter_seqfor the next read. - The log covers 365 days.
- Each read is recorded as an
audit.export_readaction (actorsystem, channelapi_key) that enters a later batch; a periodic read will therefore see the actions of its earlier reads.
Catalog operations and exports
With write:catalog or write:prices the integration can apply changes to the catalog through operations: POST https://daas.masnet.com/api/v1/integrations/data/catalog-operations creates an operation, GET …/catalog-operations/{id} and …/results query it, and POST …/{id}/validate, …/apply and …/cancel govern it. POST …/catalog-exports requests an export and GET …/catalog-exports/{id}/items reads it. An operation from a test integration can be validated, but only a production one applies it. Idempotency uses client_request_id (UUID). The contracts are two JSON Schemas (draft 2020-12) published at stable addresses:
| Contract | What it describes | Schema |
|---|---|---|
catalog-exchange.v1 | Body of POST …/catalog-operations ($defs/operationRequest), items of an export ($defs/operationItem), the sheet-based package and the field registry. | /developers/schemas/catalog-exchange/v1.json |
catalog-operation.v1 | State of an operation (schema root) and page of per-row results ($defs/resultsPage). | /developers/schemas/catalog-operation/v1.json |
Reads
| Read | Request | Response |
|---|---|---|
| Operation state | GET …/catalog-operations/{id} | catalog-operation.v1 document: status (uploaded, validating, needs_mapping, invalid, ready, queued, running, succeeded, completed_with_errors, cancelled or failed), counts, stages, failure and cancellation. failure (code, retryable) accompanies failed and also invalid, where retryable is false and names the reason the whole file was rejected. It is not paginated. |
| Per-row results | GET …/catalog-operations/{id}/results | { contract_version, operation_id, items, next_cursor, has_more }. Each element of items reports row_ref, action, state, identity, changed_fields and error. |
| Exported items | GET …/catalog-exports/{id}/items | { contract_version, export_id, expires_at, data, next_cursor, has_more }. Each element of data carries row_ref and the fields the credential can see today. |
- Results and items are paginated the same way:
limit(100 by default, maximum 500) andcursor. Any other parameter responds400 invalid_parameter. - To continue, repeat the request with
cursor=<next_cursor>. The walk ends whenhas_moreisfalse;next_cursoris thennull. - The cursor is opaque, belongs to the operation or export that issued it, and is valid for 24 hours. One from another operation or malformed responds
400 invalid_parameter; an expired one,410 cursor_expired. If the data permission changes mid-walk, it responds410 cursor_scope_changed: restart the walk. A permission change does not mean rows were lost. - An export still in progress responds
409 export_not_readyand an expired one (kept for 30 days),410 export_expired. - The results read omits from
changed_fieldsand from the error location the fields the credential can no longer see; the row is kept.
Scopes per operation
| Operation | Required scope |
|---|---|
Create (POST …/catalog-operations), validate and apply | write:catalog for products, attributes, memberships, groups and documents; write:prices for list_price, currency and price rules. Every scope the operation touches is required, declared on the credential and backed by a write data permission; if one is missing, 403 insufficient_scope. Applying is only possible from a production integration. |
| Cancel | write:catalog, write:prices or read:catalog. Only the integration that created the operation can cancel it, and only while the application is queued or running. |
| State and results | Being able to see at least one field of the operation: read:catalog (read:prices for price rules) or the matching write: scope with a write permission, and the field group granted. If none is visible any longer, 403 insufficient_scope. |
| Request an export and read its items | read:catalog, with a catalog data permission. Each page is revalidated against the permission of that moment. |
References between rows
In an operation body each product goes in items with a row_ref that is unique within the operation. product_ref appears only in price_rules and in documents, where it repeats the row_ref of the product the rule or link refers to; if it does not match a row of the body, that rule or link is invalid in the results (CATALOG_REFERENCE_INVALID).
In the XLSX or CSV file of the catalog-exchange.v1 package (the catalog exported "For update" from Masnet), product_ref is optional in the Products sheet: it only links the row to its Attributes, Memberships, PriceRules and Documents rows. Left empty, the row is a product without relations in the file. Duplicated or malformed, only those rows become invalid, with sheet, row and column, and the relations that name it are left without a product (CATALOG_REFERENCE_INVALID).
Client and portfolio operations
With write:clients or write:sales_portfolios the integration writes clients, client groups, portfolios and assignments with the same sheets, columns and rules as the import of the Masnet Clients spreadsheet: POST https://daas.masnet.com/api/v1/integrations/data/client-operations creates an operation and validates it, GET …/client-operations/{id} and …/results query it, and POST …/{id}/apply and …/cancel govern it. A test integration creates and queries operations as a simulation, but only a production one applies them. The full walk, with the initial load and the events, is in the Clients and portfolios from the CRM guide. The contracts are two JSON Schemas (draft 2020-12), an exact copy of the ones Masnet validates:
| Contract | What it describes | Schema |
|---|---|---|
commercial-portfolios-exchange.v1 | Body of POST …/client-operations: the sheets of the Clients spreadsheet and their columns. | /developers/schemas/commercial-portfolios-exchange/v1.json |
commercial-operation.v1 | State of an operation ($defs/operation) and page of per-row results ($defs/resultsPage). | /developers/schemas/commercial-operation/v1.json |
Body
schema_versioniscommercial-portfolios-exchange.v1andclient_request_id(UUID) is required: repeating the same body returns the same operation withIdempotent-Replayed: true, and the sameclient_request_idwith other content responds409 idempotency_conflict.sheetscarries one or more sheets. Each sheet is a list of rows and each row, an object with the columns it carries. A cell is text (up to 32,767 characters), a number ornull. A sheet or a column the spreadsheet does not have responds400 invalid_requestwithissues(path and rule, without values).- Up to 100,000 rows across all sheets and a 10 MiB body.
- All the rows of a sheet carry the same columns as the first, because Masnet reads it as the header. A column that a row does not use is sent as
nullinstead of being omitted: withoutversion,nulldoes not change the field, and withversionit clears it. A sheet with rows of other columns responds400 invalid_requestwithissues[].keywordsameKeysand the path of the first differing row (for example/sheets/Clientes/3). - A row names the client by
cliente_ref(theidofGET …/data/clients) or bycodigo_unidad(the Mercado Público purchasing unit), withrutto tell apart units with the same code. In the member sheets,grupo_refandcartera_refare theidof an existing group or portfolio, or the name the same operation carries inGruposorCarteras. accionisMantener(keep, the default) orArchivar(archive) inClientes,GruposandCarteras, andMantener,Agregar(add) orQuitar(remove) in the member and assignment sheets. A row withoutaccionadds or updates.versionis the version of the row that the Masnet spreadsheet exported "For update" carries: if the row changed afterwards, it is left in conflict and not applied. Withoutversion, an empty cell does not change the field.
POST /api/v1/integrations/data/client-operations HTTP/1.1
Host: daas.masnet.com
Authorization: Bearer <token>
Content-Type: application/json
{
"schema_version": "commercial-portfolios-exchange.v1",
"client_request_id": "0b5e2c1d-3f4a-4b6c-8d7e-9f0a1b2c3d4e",
"sheets": {
"Clientes": [
{
"codigo_unidad": "7248",
"rut": "61.608.000-0",
"codigo_interno": "CRM-00412",
"segmento": "Salud",
"etiquetas": "Oncología, Zona sur"
},
{
"cliente_ref": "88123",
"accion": "Archivar"
}
],
"Grupos": [
{
"grupo": "Hospitales zona sur",
"visibilidad": "Empresa"
}
],
"Grupo_Miembros": [
{
"grupo_ref": "Hospitales zona sur",
"codigo_unidad": "7248",
"accion": "Agregar"
}
]
}
}HTTP/1.1 202 Accepted
Location: /api/v1/integrations/data/client-operations/7d0a3f4e-2b1c-4d5e-8f90-1a2b3c4d5e6f
Content-Type: application/json; charset=utf-8
{
"operation_id": "7d0a3f4e-2b1c-4d5e-8f90-1a2b3c4d5e6f",
"status": "validating",
"idempotent_replay": false,
"links": {
"self": "/api/v1/integrations/data/client-operations/7d0a3f4e-2b1c-4d5e-8f90-1a2b3c4d5e6f",
"apply": "/api/v1/integrations/data/client-operations/7d0a3f4e-2b1c-4d5e-8f90-1a2b3c4d5e6f/apply",
"cancel": "/api/v1/integrations/data/client-operations/7d0a3f4e-2b1c-4d5e-8f90-1a2b3c4d5e6f/cancel",
"results": "/api/v1/integrations/data/client-operations/7d0a3f4e-2b1c-4d5e-8f90-1a2b3c4d5e6f/results"
},
"operation": {
"contract_version": "commercial-operation.v1",
"operation_id": "7d0a3f4e-2b1c-4d5e-8f90-1a2b3c4d5e6f",
"status": "validating",
"environment": "production",
"validation_token": null,
"error_policy": null,
"failure_code": null,
"created_at": "2026-11-26T14:02:11.482Z",
"updated_at": "2026-11-26T14:02:11.482Z",
"validated_at": null,
"finished_at": null
}
}Sheets and columns
Each column is authorized as the path <sheet>.<column> (for example Clientes.segmento), which the company administrator grants by family when granting the write permission. Keys, references and versions identify the row; read-only columns are written by Masnet.
| Sheet | Scope | Columns |
|---|---|---|
Clientes | write:clients | cliente_ref (key), codigo_unidad (key), id_unidad (key), rut (key), organismo (read-only), clasificacion (read-only), origen (read-only), codigo_interno, nombre_visible, segmento, etiquetas, nivel, puntaje, notas, accion (action), version (version) |
Grupos | write:clients | grupo_ref (key), grupo, padre_ref (reference), visibilidad, accion (action), version (version) |
Grupo_Miembros | write:clients | grupo_ref (reference), cliente_ref (reference), codigo_unidad (reference), id_unidad (reference), rut (reference), accion (action) |
Carteras | write:sales_portfolios | cartera_ref (key), cartera, descripcion, accion (action), version (version) |
Cartera_Vendedores | write:sales_portfolios | cartera_ref (reference), correo (reference, people), accion (action) |
Cartera_Clientes | write:sales_portfolios | cartera_ref (reference), codigo_unidad (reference), id_unidad (reference), rut (reference), accion (action) |
Asignaciones | write:sales_portfolios | correo (reference, people), nombre (read-only, people), codigo_unidad (reference), id_unidad (reference), accion (action) |
Alcance | None: governed by Masnet | correo (reference, people), nombre (read-only, people), alcance (people), version (version, people) |
Clientes,GruposandGrupo_Miembrosrequirewrite:clients.Carteras,Cartera_Vendedores,Cartera_ClientesandAsignacionesrequirewrite:sales_portfoliosand thepeoplegroup in the same permission.- Each path requires its scope declared on the credential, a current write permission and the path granted. If any is missing, the whole operation responds
403 insufficient_scopewithdenied_fields(path,reasonandrequired_scopeof each path) and is not created. - The
Alcancesheet (what each person sees, for example "Only their clients") is governed by Masnet: an operation that carries it responds403 insufficient_scopewithreason: field_path_not_granted, even when the integration has every permission. That change is made by a person with portfolio administration in Masnet. - Read-only columns (
organismo,clasificacion,origenandnombre) respond422 field_not_writable: remove them from the body.
HTTP/1.1 403 Forbidden
Content-Type: application/problem+json; charset=utf-8
{
"denied_fields": [
{ "path": "Alcance.alcance", "reason": "field_path_not_granted", "required_scope": "write:sales_portfolios" },
{ "path": "Alcance.correo", "reason": "field_path_not_granted", "required_scope": "write:sales_portfolios" }
],
"type": "https://masnet.com/developers/errors/insufficient_scope",
"title": "Alcance insuficiente",
"status": 403,
"detail": "La operación incluye campos que los permisos vigentes de la integración no cubren.",
"code": "insufficient_scope",
"correlation_id": "5a9d2e71-3c04-4b8f-9e16-7f2b0c8d4a53"
}Operation cycle
| Step | Request | Response |
|---|---|---|
| Create | POST …/client-operations | 202 with Location, operation_id, status, idempotent_replay, links and operation. Masnet validates the rows in the background. |
| State | GET …/client-operations/{id} | commercial-operation.v1 document: status (validating, needs_mapping, ready, invalid, queued, running, completed, partially_completed, failed and cancelled), environment, validation_token (once the review is finished), error_policy, counts, failure_code and its dates. It is not paginated. |
| Results | GET …/client-operations/{id}/results | { contract_version, operation_id, items, next_cursor, has_more }. Each element reports unit_key, sheet, row_number, action, status (planned, applied, unchanged, invalid, conflict, failed and skipped) and error (code and column). |
| Apply | POST …/client-operations/{id}/apply | Body { validation_token, error_policy }. error_policy is abort_on_errors or apply_valid_units: the first does not apply a review with invalid or conflicting rows (409 operation_has_errors); the second applies the valid ones. A token that is not the one of the current review responds 409 validation_token_mismatch. It responds 202 with the operation. |
| Cancel | POST …/client-operations/{id}/cancel | No body. It responds 202 with the operation, or 409 operation_not_cancellable if its state no longer allows it. |
{
"contract_version": "commercial-operation.v1",
"operation_id": "7d0a3f4e-2b1c-4d5e-8f90-1a2b3c4d5e6f",
"status": "ready",
"environment": "production",
"validation_token": "vt_Q2xpZW50ZXMtcmV2aXNpb24tMDE",
"error_policy": null,
"failure_code": null,
"created_at": "2026-11-26T14:02:11.482Z",
"updated_at": "2026-11-26T14:02:14.907Z",
"validated_at": "2026-11-26T14:02:14.907Z",
"finished_at": null
}POST /api/v1/integrations/data/client-operations/7d0a3f4e-2b1c-4d5e-8f90-1a2b3c4d5e6f/apply HTTP/1.1
Host: daas.masnet.com
Authorization: Bearer <token>
Content-Type: application/json
{
"validation_token": "vt_Q2xpZW50ZXMtcmV2aXNpb24tMDE",
"error_policy": "apply_valid_units"
}{
"contract_version": "commercial-operation.v1",
"operation_id": "7d0a3f4e-2b1c-4d5e-8f90-1a2b3c4d5e6f",
"items": [
{
"unit_key": "buyer:30412",
"sheet": "Clientes",
"row_number": 2,
"action": "update",
"status": "planned",
"error": null
},
{
"unit_key": "buyer:51877",
"sheet": "Clientes",
"row_number": 3,
"action": "invalid",
"status": "invalid",
"error": {
"code": "system_class_archive",
"column": "accion"
}
}
],
"next_cursor": null,
"has_more": false
}Scopes and rules per step
| Step | Requires |
|---|---|
| Create and apply | The scope of each sheet the operation touches, declared and backed by a write permission. Applying authorizes again with the current permission: withdrawing a permission stops the application. Only a production integration applies; a test one receives 403 apply_not_allowed_in_test. |
| State and results | Reading today at least one of the domains the operation touches (read:clients or read:sales_portfolios, or the matching write: scope with a write permission). If it no longer reads any, 403 insufficient_scope. Results omit the error column when the credential no longer sees its field group. |
| Cancel | Any of read:clients, write:clients, read:sales_portfolios or write:sales_portfolios. |
- Results are paginated with
limit(100 by default, maximum 500) andcursor, with the same rules as the catalog ones: the cursor belongs to the operation, is valid for 24 hours and responds410 cursor_scope_changedif the permission changed. - Only the integration that created the operation sees, applies or cancels it. For another integration, or with a nonexistent identifier, it responds
404. - Creating, applying and cancelling count against the write quota; querying, against the read quota.
Framework agreement price requests
The integration the company designated as its framework agreement channel receives the com.masnet.framework_agreement_price_request.requested.v1 event and answers with the columns of the offer spreadsheet, per product code and region. The answer publishes nothing: it is stored for the review of a person at the company, who decides which offers go to the batch in preparation. The full flow, with the event, the statuses, the review and the test request, is in the Answer framework agreement price requests guide.
| Request | Scope | Response |
|---|---|---|
GET /data/framework-agreement-price-requests/{id} | read:price_requests or write:price_requests | The framework-agreement-price-request.v1 request with its status and, once answered, responded_at and rows_received. |
GET /data/framework-agreement-price-requests/{id}/rows | read:price_requests or write:price_requests | { rows, next_cursor }: 1,000 rows by default and at most 5,000 (limit), in product code and region order, with an opaque cursor. |
POST /data/framework-agreement-price-requests/{id}/response | write:price_requests | framework-agreement-price-response.v1 body with Idempotency-Key, up to 50,000 rows and 4 MiB. Responds 200 with status: received and rows_received. |
- A request of another integration, of another company or that does not exist responds
404. Reads count against the read quota and the answer also against the write quota. - Masnet validates only the shape of the answer. The business rules (product of the framework agreement, base price, dates, days and active offers) are reviewed in Masnet before the offers are loaded to the batch.
- The contracts are framework-agreement-price-request.v1 and framework-agreement-price-response.v1, exact copies of the ones Masnet validates.
Quotas
| Scope | Quota |
|---|---|
| Reads per client | 600 requests per minute |
| Writes per client (operations and exports) | 60 per minute, in addition to the read quota |
| Token endpoint | 60 per minute per IP address |
When exceeded, the API responds 429 rate_limited with Retry-After: 60 and the IETF draft 7 RateLimit headers. No response of this API is stored in caches (Cache-Control: no-store).
Errors
Errors use application/problem+json (RFC 9457) with the members type, title, status, detail, code and correlation_id. The type is a documented URL under Errors, for example https://masnet.com/developers/errors/insufficient_scope. Quote the correlation_id when contacting support. detail never includes database messages, internal identifiers or data of another company.
{
"type": "https://masnet.com/developers/errors/insufficient_scope",
"title": "Alcance insuficiente",
"status": 403,
"detail": "La credencial no tiene el scope read:contracts sobre datos autorizados.",
"code": "insufficient_scope",
"correlation_id": "<identifier>"
}