{ "components": { "schemas": { "ErrorBody": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, "MobileTripPatchInput": { "additionalProperties": false, "properties": { "destination": { "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "parentId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "tagId": { "format": "uuid", "nullable": true, "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "when": { "type": "string" } }, "type": "object" } } }, "info": { "description": "OpenAPI projection of the bfm pillar's REST contract. Authored as a ts-rest contract (src/contract/rest.ts); consumed by the mobile client and by the pillar SDK to build its operationId route map.", "title": "@pops/bfm", "version": "0.1.0" }, "openapi": "3.0.2", "paths": { "/devices/challenge": { "post": { "operationId": "device.challenge", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } }, "description": "Body" }, "responses": { "201": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "expiresIn": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "nonce": { "type": "string" } }, "required": ["nonce", "expiresIn"], "type": "object" } } }, "description": "201" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" } }, "summary": "Mint a single-use nonce for a refresh. Carries no credential and needs none", "tags": ["device"] } }, "/devices/pair": { "post": { "operationId": "device.pair", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "maxLength": 64, "minLength": 1, "type": "string" }, "deviceModel": { "maxLength": 64, "minLength": 1, "type": "string" }, "deviceName": { "maxLength": 64, "minLength": 1, "type": "string" }, "publicKey": { "maxLength": 512, "minLength": 1, "type": "string" } }, "required": ["code", "publicKey", "deviceName", "deviceModel"], "type": "object" } } }, "description": "Body" }, "responses": { "201": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "accessToken": { "type": "string" }, "deviceId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "expiresIn": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "refreshToken": { "type": "string" } }, "required": ["deviceId", "accessToken", "refreshToken", "expiresIn"], "type": "object" } } }, "description": "201" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "403": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["pairing_rejected"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message"], "type": "object" } } }, "description": "403" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" } }, "summary": "Spend a pairing code for a device identity. The tokens are returned once", "tags": ["device"] } }, "/devices/refresh": { "post": { "operationId": "device.refresh", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "nonce": { "maxLength": 256, "minLength": 1, "type": "string" }, "refreshToken": { "maxLength": 512, "minLength": 1, "type": "string" }, "signature": { "maxLength": 512, "minLength": 1, "type": "string" } }, "required": ["refreshToken", "nonce", "signature"], "type": "object" } } }, "description": "Body" }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "accessToken": { "type": "string" }, "expiresIn": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "refreshToken": { "type": "string" } }, "required": ["accessToken", "refreshToken", "expiresIn"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["challenge_expired", "invalid_grant"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "403" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" } }, "summary": "Rotate a refresh token, proving possession of the device key. Detects reuse", "tags": ["device"] } }, "/health": { "get": { "operationId": "health", "parameters": [], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "ok": { "enum": [true], "type": "boolean" }, "pillar": { "enum": ["bfm"], "type": "string" }, "status": { "enum": ["ok"], "type": "string" }, "ts": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "version": { "type": "string" } }, "required": ["ok", "status", "pillar", "version", "ts"], "type": "object" } } }, "description": "200" } }, "summary": "Liveness shape. Answers without a database round-trip", "tags": [] } }, "/mobile/barcode/lookup/{code}": { "get": { "operationId": "mobileBarcode.lookup", "parameters": [ { "in": "path", "name": "code", "required": true, "schema": { "minLength": 1, "type": "string" } }, { "in": "header", "name": "x-pops-barcode-diagnostics", "schema": { "enum": ["1"], "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "outcome": { "enum": ["found"], "type": "string" }, "product": { "additionalProperties": false, "properties": { "attributes": { "additionalProperties": { "type": "string" }, "type": "object" }, "code": { "minLength": 1, "type": "string" }, "contributors": { "items": { "additionalProperties": false, "properties": { "name": { "minLength": 1, "type": "string" }, "role": { "minLength": 1, "type": "string" } }, "required": ["name"], "type": "object" }, "type": "array" }, "description": { "minLength": 1, "type": "string" }, "fetchedAt": { "minLength": 1, "type": "string" }, "imageUrls": { "items": { "format": "uri", "type": "string" }, "type": "array" }, "kind": { "enum": ["book"], "type": "string" }, "language": { "minLength": 1, "type": "string" }, "pageCount": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "publishedDate": { "minLength": 1, "type": "string" }, "publisher": { "minLength": 1, "type": "string" }, "source": { "enum": ["open_library", "google_books"], "type": "string" }, "subjects": { "items": { "type": "string" }, "type": "array" }, "subtitle": { "minLength": 1, "type": "string" }, "title": { "minLength": 1, "type": "string" } }, "required": [ "code", "kind", "title", "contributors", "subjects", "imageUrls", "source", "fetchedAt", "attributes" ], "type": "object" } }, "required": ["outcome", "product"], "type": "object" }, { "additionalProperties": false, "properties": { "outcome": { "enum": ["not_found"], "type": "string" }, "reason": { "enum": ["unsupported"], "type": "string" } }, "required": ["outcome"], "type": "object" }, { "additionalProperties": false, "properties": { "error": { "allOf": [ { "$ref": "#/components/schemas/ErrorBody" } ] }, "outcome": { "enum": ["unavailable"], "type": "string" } }, "required": ["outcome"], "type": "object" } ] } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" } }, "summary": "Look up book metadata for a scanned barcode", "tags": ["mobileBarcode"] } }, "/mobile/bootstrap": { "get": { "operationId": "mobile.bootstrap", "parameters": [], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "device": { "additionalProperties": false, "properties": { "capabilities": { "items": { "type": "string" }, "type": "array" }, "id": { "type": "string" }, "lastSeenAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "name": { "type": "string" } }, "required": ["id", "name", "lastSeenAt", "capabilities"], "type": "object" }, "features": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "reachability": { "enum": ["healthy", "degraded", "unavailable", "contract-mismatch"], "type": "string" } }, "required": ["id", "reachability"], "type": "object" }, "type": "array" }, "pillars": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "reachability": { "enum": ["healthy", "degraded", "unavailable", "contract-mismatch"], "type": "string" } }, "required": ["id", "reachability"], "type": "object" }, "type": "array" }, "registry": { "additionalProperties": false, "properties": { "source": { "enum": ["fresh", "cached", "stale-fallback", "unavailable"], "type": "string" } }, "required": ["source"], "type": "object" }, "session": { "additionalProperties": false, "properties": { "email": { "nullable": true, "type": "string" }, "kind": { "enum": ["operator", "guest"], "type": "string" } }, "required": ["kind", "email"], "type": "object" } }, "required": ["device", "registry", "pillars", "features"], "type": "object" } } }, "description": "200" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" } }, "summary": "What the app should render, and who the federation says it is talking to", "tags": ["mobile"] } }, "/mobile/contacts/merchants": { "post": { "operationId": "mobileContacts.createMerchant", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "name": { "minLength": 1, "type": "string" } }, "required": ["name"], "type": "object" } } }, "description": "Body" }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "required": ["id", "name"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Record a new merchant from the reader's own wording. Idempotent by name: a repeated call with the same name answers the same id rather than a conflict", "tags": ["mobileContacts"] } }, "/mobile/contacts/merchants/search": { "get": { "operationId": "mobileContacts.searchMerchants", "parameters": [ { "in": "query", "name": "q", "required": true, "schema": { "minLength": 1, "type": "string" } }, { "in": "query", "name": "limit", "schema": { "exclusiveMinimum": true, "maximum": 100, "minimum": 0, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "data": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "required": ["id", "name"], "type": "object" }, "type": "array" } }, "required": ["data"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Merchants matching free text, for the review form's merchant picker — there are hundreds, so matching happens here, not on the phone", "tags": ["mobileContacts"] } }, "/mobile/contacts/merchants/{id}": { "get": { "operationId": "mobileContacts.getMerchant", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "required": ["id", "name"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "One merchant by id, for a draft that arrives already matched", "tags": ["mobileContacts"] } }, "/mobile/contacts/merchants/{id}/addresses": { "get": { "operationId": "mobileContacts.getMerchantAddresses", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "data": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "value": { "type": "string" } }, "required": ["id", "value"], "type": "object" }, "type": "array" } }, "required": ["data"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Every address recorded against one merchant, for the review screen's address picker", "tags": ["mobileContacts"] }, "post": { "operationId": "mobileContacts.createMerchantAddress", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "value": { "minLength": 1, "type": "string" } }, "required": ["value"], "type": "object" } } }, "description": "Body" }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "value": { "type": "string" } }, "required": ["id", "value"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Record a new address for one merchant, typed by the reviewer", "tags": ["mobileContacts"] } }, "/mobile/documents/status": { "get": { "operationId": "mobileDocuments.status", "parameters": [], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "allowedMimeTypes": { "items": { "type": "string" }, "type": "array" }, "available": { "type": "boolean" }, "configured": { "type": "boolean" }, "maxUploadBytes": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["configured", "available", "maxUploadBytes", "allowedMimeTypes"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Read live Documents upload policy without granting upload authority", "tags": ["mobileDocuments"] } }, "/mobile/documents/tasks/{taskId}": { "get": { "operationId": "mobileDocuments.task", "parameters": [ { "in": "path", "name": "taskId", "required": true, "schema": { "pattern": "^[A-Za-z0-9_-]{1,72}$", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "documentId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "reason": { "nullable": true, "type": "string" }, "state": { "enum": ["pending", "done", "duplicate", "failed"], "type": "string" } }, "required": ["state", "documentId", "reason"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "412": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "412" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Read the owner task without inferring an original from acceptance", "tags": ["mobileDocuments"] } }, "/mobile/documents/{id}": { "get": { "operationId": "mobileDocuments.getDocument", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "created": { "type": "string" }, "id": { "type": "number" }, "originalFileName": { "type": "string" }, "thumbnailUrl": { "type": "string" }, "title": { "type": "string" } }, "required": ["id", "title", "created", "originalFileName", "thumbnailUrl"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "412": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "412" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Read original metadata from the Documents owner", "tags": ["mobileDocuments"] } }, "/mobile/ego/action-batches/{batchId}/decide": { "post": { "operationId": "mobileEgo.decideActionBatch", "parameters": [ { "in": "path", "name": "batchId", "required": true, "schema": { "minLength": 1, "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "alwaysAllow": { "items": { "minLength": 1, "type": "string" }, "type": "array" }, "approve": { "items": { "minLength": 1, "type": "string" }, "type": "array" }, "reject": { "items": { "minLength": 1, "type": "string" }, "type": "array" } }, "required": ["approve", "reject", "alwaysAllow"], "type": "object" } } }, "description": "Body" }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "batchId": { "type": "string" } }, "required": ["batchId"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "409": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "409" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Record a decision for a pending Ego action batch", "tags": ["mobileEgo"] } }, "/mobile/ego/conversations": { "get": { "operationId": "mobileEgo.listConversations", "parameters": [ { "in": "query", "name": "limit", "schema": { "exclusiveMinimum": true, "maximum": 100, "minimum": 0, "type": "integer" } }, { "in": "query", "name": "offset", "schema": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, { "in": "query", "name": "q", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "conversations": { "items": { "additionalProperties": false, "properties": { "createdAt": { "type": "string" }, "id": { "type": "string" }, "title": { "nullable": true, "type": "string" }, "updatedAt": { "type": "string" } }, "required": ["id", "title", "createdAt", "updatedAt"], "type": "object" }, "type": "array" }, "total": { "type": "number" } }, "required": ["conversations", "total"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "One page of Ego conversations for the mobile client", "tags": ["mobileEgo"] } }, "/mobile/ego/conversations/{id}": { "get": { "operationId": "mobileEgo.getConversation", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "conversation": { "additionalProperties": false, "properties": { "createdAt": { "type": "string" }, "id": { "type": "string" }, "title": { "nullable": true, "type": "string" }, "updatedAt": { "type": "string" } }, "required": ["id", "title", "createdAt", "updatedAt"], "type": "object" }, "messages": { "items": { "additionalProperties": false, "properties": { "createdAt": { "type": "string" }, "id": { "type": "string" }, "parts": { "items": { "additionalProperties": false, "properties": { "actions": { "items": { "additionalProperties": false, "properties": { "actionId": { "type": "string" }, "status": { "type": "string" }, "summary": { "type": "string" }, "tool": { "type": "string" } }, "required": ["actionId", "tool", "summary", "status"], "type": "object" }, "type": "array" }, "batchId": { "type": "string" }, "subtitle": { "type": "string" }, "text": { "type": "string" }, "title": { "type": "string" }, "type": { "type": "string" }, "uri": { "type": "string" } }, "required": ["type"], "type": "object" }, "type": "array" }, "role": { "type": "string" } }, "required": ["id", "role", "parts", "createdAt"], "type": "object" }, "type": "array" } }, "required": ["conversation", "messages"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Read one Ego conversation with its messages and parts", "tags": ["mobileEgo"] } }, "/mobile/finance/accounts": { "get": { "operationId": "mobileFinance.listAccounts", "parameters": [ { "in": "query", "name": "search", "schema": { "maxLength": 200, "type": "string" } }, { "in": "query", "name": "kind", "schema": { "enum": [ "checking", "savings", "credit-card", "cash", "gift-card", "person", "shared", "loan", "novated-lease", "crypto", "other" ], "type": "string" } }, { "in": "query", "name": "archived", "schema": { "enum": ["true", "false"], "type": "string" } }, { "in": "query", "name": "cursor", "schema": { "type": "string" } }, { "in": "query", "name": "limit", "required": true, "schema": { "default": 25, "maximum": 100, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "accounts": { "items": { "additionalProperties": false, "properties": { "archived": { "type": "boolean" }, "balance": { "additionalProperties": false, "properties": { "asOf": { "type": "string" }, "balanceCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "basis": { "enum": ["checkpoint", "transactions"], "type": "string" }, "inconsistent": { "type": "boolean" }, "reconciliation": { "enum": ["unmeasured", "agreed", "disagrees"], "type": "string" } }, "required": [ "balanceCents", "asOf", "basis", "reconciliation", "inconsistent" ], "type": "object" }, "contact": { "nullable": true, "type": "string" }, "currency": { "type": "string" }, "id": { "type": "string" }, "institutionId": { "nullable": true, "type": "string" }, "institutionName": { "nullable": true, "type": "string" }, "kind": { "type": "string" }, "name": { "type": "string" }, "transactionCount": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "viewerRole": { "type": "string" } }, "required": [ "id", "name", "kind", "currency", "archived", "institutionId", "institutionName", "contact", "balance", "transactionCount" ], "type": "object" }, "type": "array" }, "nextCursor": { "nullable": true, "type": "string" }, "totalCount": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["accounts", "nextCursor"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "One cursor-paginated account page after search and filters", "tags": ["mobileFinance"] } }, "/mobile/finance/accounts/{id}": { "get": { "operationId": "mobileFinance.getAccount", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "account": { "additionalProperties": false, "properties": { "archived": { "type": "boolean" }, "balance": { "additionalProperties": false, "properties": { "asOf": { "type": "string" }, "balanceCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "basis": { "enum": ["checkpoint", "transactions"], "type": "string" }, "inconsistent": { "type": "boolean" }, "reconciliation": { "enum": ["unmeasured", "agreed", "disagrees"], "type": "string" } }, "required": [ "balanceCents", "asOf", "basis", "reconciliation", "inconsistent" ], "type": "object" }, "contact": { "nullable": true, "type": "string" }, "currency": { "type": "string" }, "id": { "type": "string" }, "institutionId": { "nullable": true, "type": "string" }, "institutionName": { "nullable": true, "type": "string" }, "kind": { "type": "string" }, "name": { "type": "string" }, "transactionCount": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "viewerRole": { "type": "string" } }, "required": [ "id", "name", "kind", "currency", "archived", "institutionId", "institutionName", "contact", "balance", "transactionCount" ], "type": "object" }, "history": { "items": { "additionalProperties": false, "properties": { "balanceCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "month": { "type": "string" } }, "required": ["month", "balanceCents"], "type": "object" }, "type": "array" } }, "required": ["account", "history"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "One account and its month-end balance history, for the dashboard screen", "tags": ["mobileFinance"] } }, "/mobile/finance/accounts/{id}/history": { "get": { "operationId": "mobileFinance.getAccountHistory", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "limit", "schema": { "exclusiveMinimum": true, "maximum": 100, "minimum": 0, "type": "integer" } }, { "in": "query", "name": "cursor", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "data": { "items": { "additionalProperties": false, "properties": { "accountId": { "type": "string" }, "action": { "type": "string" }, "actorEmail": { "nullable": true, "type": "string" }, "actorKind": { "type": "string" }, "after": { "additionalProperties": false, "nullable": true, "properties": { "accountId": { "type": "string" }, "amountMinorUnits": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "currency": { "type": "string" }, "date": { "type": "string" }, "description": { "type": "string" }, "entityId": { "nullable": true, "type": "string" }, "entityName": { "nullable": true, "type": "string" }, "notes": { "nullable": true, "type": "string" }, "tags": { "items": { "type": "string" }, "type": "array" }, "type": { "type": "string" } }, "required": [ "accountId", "date", "amountMinorUnits", "currency", "description", "type", "notes", "entityId", "entityName", "tags" ], "type": "object" }, "at": { "type": "string" }, "before": { "additionalProperties": false, "nullable": true, "properties": { "accountId": { "type": "string" }, "amountMinorUnits": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "currency": { "type": "string" }, "date": { "type": "string" }, "description": { "type": "string" }, "entityId": { "nullable": true, "type": "string" }, "entityName": { "nullable": true, "type": "string" }, "notes": { "nullable": true, "type": "string" }, "tags": { "items": { "type": "string" }, "type": "array" }, "type": { "type": "string" } }, "required": [ "accountId", "date", "amountMinorUnits", "currency", "description", "type", "notes", "entityId", "entityName", "tags" ], "type": "object" }, "changed": { "items": { "type": "string" }, "type": "array" }, "id": { "type": "string" }, "transactionId": { "type": "string" } }, "required": [ "id", "transactionId", "accountId", "action", "actorKind", "actorEmail", "at", "before", "after", "changed" ], "type": "object" }, "type": "array" }, "nextCursor": { "nullable": true, "type": "string" } }, "required": ["data", "nextCursor"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "One page of the changes made to an account’s transactions, newest first", "tags": ["mobileFinance"] } }, "/mobile/finance/summary": { "get": { "operationId": "mobileFinance.getSummary", "parameters": [ { "in": "query", "name": "window", "schema": { "enum": ["30d", "90d", "month", "year", "all"], "type": "string" } }, { "in": "query", "name": "topLimit", "schema": { "exclusiveMinimum": true, "maximum": 50, "minimum": 0, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "costOfCredit": { "additionalProperties": false, "properties": { "byAccount": { "items": { "additionalProperties": false, "properties": { "accountId": { "type": "string" }, "accountName": { "nullable": true, "type": "string" }, "archived": { "type": "boolean" }, "currency": { "nullable": true, "type": "string" }, "fees": { "additionalProperties": false, "properties": { "cents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "transactionCount": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["cents", "transactionCount"], "type": "object" }, "shareOfTotal": { "nullable": true, "type": "number" } }, "required": [ "accountId", "accountName", "currency", "archived", "fees", "shareOfTotal" ], "type": "object" }, "type": "array" }, "byMonth": { "items": { "additionalProperties": false, "properties": { "byAccount": { "items": { "additionalProperties": false, "properties": { "accountId": { "type": "string" }, "fees": { "additionalProperties": false, "properties": { "cents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "transactionCount": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["cents", "transactionCount"], "type": "object" } }, "required": ["accountId", "fees"], "type": "object" }, "type": "array" }, "fees": { "additionalProperties": false, "properties": { "cents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "transactionCount": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["cents", "transactionCount"], "type": "object" }, "month": { "type": "string" } }, "required": ["month", "fees", "byAccount"], "type": "object" }, "type": "array" }, "byTag": { "items": { "additionalProperties": false, "properties": { "fees": { "additionalProperties": false, "properties": { "cents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "transactionCount": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["cents", "transactionCount"], "type": "object" }, "shareOfTotal": { "nullable": true, "type": "number" }, "tag": { "type": "string" } }, "required": ["tag", "fees", "shareOfTotal"], "type": "object" }, "type": "array" }, "deltaCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "nullable": true, "type": "integer" }, "deltaRatio": { "nullable": true, "type": "number" }, "previousTotal": { "additionalProperties": false, "nullable": true, "properties": { "cents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "transactionCount": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["cents", "transactionCount"], "type": "object" }, "total": { "additionalProperties": false, "properties": { "cents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "transactionCount": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["cents", "transactionCount"], "type": "object" } }, "required": [ "total", "previousTotal", "deltaCents", "deltaRatio", "byAccount", "byMonth", "byTag" ], "type": "object" }, "window": { "additionalProperties": false, "properties": { "end": { "type": "string" }, "key": { "enum": ["30d", "90d", "month", "year", "all"], "type": "string" }, "previous": { "additionalProperties": false, "nullable": true, "properties": { "end": { "type": "string" }, "start": { "type": "string" } }, "required": ["start", "end"], "type": "object" }, "start": { "nullable": true, "type": "string" } }, "required": ["key", "start", "end", "previous"], "type": "object" } }, "required": ["window", "costOfCredit"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Finance cost of credit for a window and the period before it", "tags": ["mobileFinance"] } }, "/mobile/finance/transactions": { "get": { "operationId": "mobileFinance.listTransactions", "parameters": [ { "in": "query", "name": "limit", "schema": { "exclusiveMinimum": true, "maximum": 100, "minimum": 0, "type": "integer" } }, { "in": "query", "name": "cursor", "schema": { "type": "string" } }, { "in": "query", "name": "accountId", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "data": { "items": { "additionalProperties": false, "properties": { "amountMinorUnits": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "currency": { "type": "string" }, "date": { "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "type": "string" }, "description": { "type": "string" }, "entityName": { "nullable": true, "type": "string" }, "id": { "type": "string" }, "tags": { "items": { "type": "string" }, "type": "array" }, "type": { "type": "string" } }, "required": [ "id", "description", "amountMinorUnits", "currency", "date", "type", "entityName", "tags" ], "type": "object" }, "type": "array" }, "nextCursor": { "nullable": true, "type": "string" } }, "required": ["data", "nextCursor"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "One cursor-paginated page of transaction list rows", "tags": ["mobileFinance"] }, "post": { "operationId": "mobileFinance.createTransaction", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "accountId": { "minLength": 1, "type": "string" }, "amountMinorUnits": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "country": { "nullable": true, "type": "string" }, "date": { "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "type": "string" }, "description": { "minLength": 1, "type": "string" }, "entityId": { "nullable": true, "type": "string" }, "entityName": { "nullable": true, "type": "string" }, "location": { "nullable": true, "type": "string" }, "notes": { "nullable": true, "type": "string" }, "tags": { "items": { "type": "string" }, "type": "array" }, "type": { "minLength": 1, "type": "string" } }, "required": ["accountId", "description", "amountMinorUnits", "date", "type"], "type": "object" } } }, "description": "Body" }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "account": { "type": "string" }, "amountMinorUnits": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "country": { "nullable": true, "type": "string" }, "currency": { "type": "string" }, "date": { "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "type": "string" }, "description": { "type": "string" }, "entityId": { "nullable": true, "type": "string" }, "entityName": { "nullable": true, "type": "string" }, "id": { "type": "string" }, "lastEditedTime": { "type": "string" }, "location": { "nullable": true, "type": "string" }, "notes": { "nullable": true, "type": "string" }, "relatedTransactionId": { "nullable": true, "type": "string" }, "tags": { "items": { "type": "string" }, "type": "array" }, "type": { "type": "string" } }, "required": [ "id", "description", "amountMinorUnits", "currency", "date", "type", "entityName", "tags", "account", "entityId", "location", "country", "notes", "relatedTransactionId", "lastEditedTime" ], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBody" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" }, { "additionalProperties": false, "properties": { "code": { "enum": ["finance.resource.forbidden"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Create a transaction on an account the caller may edit", "tags": ["mobileFinance"] } }, "/mobile/finance/transactions/receipt-extract": { "post": { "operationId": "mobileFinance.extractTransactionReceipt", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "accountId": { "minLength": 1, "type": "string" }, "parts": { "items": { "additionalProperties": false, "properties": { "dataBase64": { "minLength": 1, "type": "string" }, "mediaType": { "enum": [ "image/jpeg", "image/png", "image/webp", "image/gif", "application/pdf", "text/plain" ], "type": "string" } }, "required": ["mediaType", "dataBase64"], "type": "object" }, "minItems": 1, "type": "array" } }, "required": ["accountId", "parts"], "type": "object" } } }, "description": "Body" }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "outcome": { "type": "string" }, "receiptUris": { "items": { "type": "string" }, "type": "array" }, "suggestion": { "additionalProperties": false, "nullable": true, "properties": { "amountMinorUnits": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "currency": { "type": "string" }, "currencyMismatch": { "type": "boolean" }, "date": { "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "type": "string" }, "description": { "nullable": true, "type": "string" } }, "required": [ "date", "description", "amountMinorUnits", "currency", "currencyMismatch" ], "type": "object" } }, "required": ["outcome", "receiptUris", "suggestion"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBody" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" }, { "additionalProperties": false, "properties": { "code": { "enum": ["finance.resource.forbidden"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "413": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["payload_too_large"], "type": "string" }, "maxBytes": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "message": { "type": "string" } }, "required": ["code", "maxBytes", "message"], "type": "object" } } }, "description": "413" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Store a receipt and suggest the date, description and amount of a new transaction. Writes no transaction", "tags": ["mobileFinance"] } }, "/mobile/finance/transactions/{id}": { "get": { "operationId": "mobileFinance.getTransaction", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "account": { "type": "string" }, "amountMinorUnits": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "country": { "nullable": true, "type": "string" }, "currency": { "type": "string" }, "date": { "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "type": "string" }, "description": { "type": "string" }, "entityId": { "nullable": true, "type": "string" }, "entityName": { "nullable": true, "type": "string" }, "id": { "type": "string" }, "lastEditedTime": { "type": "string" }, "location": { "nullable": true, "type": "string" }, "notes": { "nullable": true, "type": "string" }, "relatedTransactionId": { "nullable": true, "type": "string" }, "tags": { "items": { "type": "string" }, "type": "array" }, "type": { "type": "string" } }, "required": [ "id", "description", "amountMinorUnits", "currency", "date", "type", "entityName", "tags", "account", "entityId", "location", "country", "notes", "relatedTransactionId", "lastEditedTime" ], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "The fuller record behind one list row, for the detail screen", "tags": ["mobileFinance"] }, "patch": { "operationId": "mobileFinance.updateTransaction", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "accountId": { "minLength": 1, "type": "string" }, "amountMinorUnits": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "country": { "nullable": true, "type": "string" }, "date": { "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "type": "string" }, "description": { "minLength": 1, "type": "string" }, "entityId": { "nullable": true, "type": "string" }, "entityName": { "nullable": true, "type": "string" }, "location": { "nullable": true, "type": "string" }, "notes": { "nullable": true, "type": "string" }, "tags": { "items": { "type": "string" }, "type": "array" }, "type": { "minLength": 1, "type": "string" } }, "type": "object" } } }, "description": "Body" }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "account": { "type": "string" }, "amountMinorUnits": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "country": { "nullable": true, "type": "string" }, "currency": { "type": "string" }, "date": { "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "type": "string" }, "description": { "type": "string" }, "entityId": { "nullable": true, "type": "string" }, "entityName": { "nullable": true, "type": "string" }, "id": { "type": "string" }, "lastEditedTime": { "type": "string" }, "location": { "nullable": true, "type": "string" }, "notes": { "nullable": true, "type": "string" }, "relatedTransactionId": { "nullable": true, "type": "string" }, "tags": { "items": { "type": "string" }, "type": "array" }, "type": { "type": "string" } }, "required": [ "id", "description", "amountMinorUnits", "currency", "date", "type", "entityName", "tags", "account", "entityId", "location", "country", "notes", "relatedTransactionId", "lastEditedTime" ], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBody" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" }, { "additionalProperties": false, "properties": { "code": { "enum": ["finance.resource.forbidden"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Change fields of a transaction the caller may edit", "tags": ["mobileFinance"] } }, "/mobile/finance/transactions/{id}/attachments": { "get": { "operationId": "mobileFinance.listTransactionAttachments", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "data": { "items": { "additionalProperties": false, "properties": { "createdAt": { "type": "string" }, "createdBy": { "nullable": true, "type": "string" }, "id": { "type": "string" }, "mediaType": { "type": "string" }, "position": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "transactionId": { "type": "string" } }, "required": [ "id", "transactionId", "mediaType", "position", "createdAt", "createdBy" ], "type": "object" }, "type": "array" } }, "required": ["data"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "The files attached to a transaction, in order", "tags": ["mobileFinance"] }, "post": { "operationId": "mobileFinance.attachToTransaction", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "parts": { "items": { "additionalProperties": false, "properties": { "dataBase64": { "minLength": 1, "type": "string" }, "mediaType": { "enum": [ "image/jpeg", "image/png", "image/webp", "image/gif", "application/pdf", "text/plain" ], "type": "string" } }, "required": ["mediaType", "dataBase64"], "type": "object" }, "minItems": 1, "type": "array" }, "receiptUris": { "items": { "pattern": "^pops:\\/\\/purchases\\/receipt\\/[0-9a-f]{64}$", "type": "string" }, "maxItems": 100, "minItems": 1, "type": "array" } }, "type": "object" } } }, "description": "Body" }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "data": { "items": { "additionalProperties": false, "properties": { "createdAt": { "type": "string" }, "createdBy": { "nullable": true, "type": "string" }, "id": { "type": "string" }, "mediaType": { "type": "string" }, "position": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "transactionId": { "type": "string" } }, "required": [ "id", "transactionId", "mediaType", "position", "createdAt", "createdBy" ], "type": "object" }, "type": "array" } }, "required": ["data"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBody" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" }, { "additionalProperties": false, "properties": { "code": { "enum": ["finance.resource.forbidden"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "413": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["payload_too_large"], "type": "string" }, "maxBytes": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "message": { "type": "string" } }, "required": ["code", "maxBytes", "message"], "type": "object" } } }, "description": "413" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Attach files to a transaction: new ones to store, or receipt URIs already stored. Answers every file named, in order", "tags": ["mobileFinance"] } }, "/mobile/finance/transactions/{id}/attachments/{attachmentId}": { "get": { "operationId": "mobileFinance.getTransactionAttachment", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "attachmentId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "byteLength": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "dataBase64": { "type": "string" }, "mediaType": { "type": "string" }, "sha256": { "type": "string" } }, "required": ["sha256", "mediaType", "byteLength", "dataBase64"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "One attached file, full size", "tags": ["mobileFinance"] } }, "/mobile/finance/transactions/{id}/attachments/{attachmentId}/thumbnail": { "get": { "operationId": "mobileFinance.getTransactionAttachmentThumbnail", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "attachmentId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "byteLength": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "dataBase64": { "type": "string" }, "mediaType": { "type": "string" }, "sha256": { "type": "string" } }, "required": ["sha256", "mediaType", "byteLength", "dataBase64"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "415": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "415" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "One attached file at a size a list row can afford", "tags": ["mobileFinance"] } }, "/mobile/finance/transactions/{id}/history": { "get": { "operationId": "mobileFinance.getTransactionHistory", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "data": { "items": { "additionalProperties": false, "properties": { "accountId": { "type": "string" }, "action": { "type": "string" }, "actorEmail": { "nullable": true, "type": "string" }, "actorKind": { "type": "string" }, "after": { "additionalProperties": false, "nullable": true, "properties": { "accountId": { "type": "string" }, "amountMinorUnits": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "currency": { "type": "string" }, "date": { "type": "string" }, "description": { "type": "string" }, "entityId": { "nullable": true, "type": "string" }, "entityName": { "nullable": true, "type": "string" }, "notes": { "nullable": true, "type": "string" }, "tags": { "items": { "type": "string" }, "type": "array" }, "type": { "type": "string" } }, "required": [ "accountId", "date", "amountMinorUnits", "currency", "description", "type", "notes", "entityId", "entityName", "tags" ], "type": "object" }, "at": { "type": "string" }, "before": { "additionalProperties": false, "nullable": true, "properties": { "accountId": { "type": "string" }, "amountMinorUnits": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "currency": { "type": "string" }, "date": { "type": "string" }, "description": { "type": "string" }, "entityId": { "nullable": true, "type": "string" }, "entityName": { "nullable": true, "type": "string" }, "notes": { "nullable": true, "type": "string" }, "tags": { "items": { "type": "string" }, "type": "array" }, "type": { "type": "string" } }, "required": [ "accountId", "date", "amountMinorUnits", "currency", "description", "type", "notes", "entityId", "entityName", "tags" ], "type": "object" }, "changed": { "items": { "type": "string" }, "type": "array" }, "id": { "type": "string" }, "transactionId": { "type": "string" } }, "required": [ "id", "transactionId", "accountId", "action", "actorKind", "actorEmail", "at", "before", "after", "changed" ], "type": "object" }, "type": "array" } }, "required": ["data"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Who created or changed a transaction and what it said either side, newest first", "tags": ["mobileFinance"] } }, "/mobile/inventory/codes/suggest": { "post": { "operationId": "mobileInventory.suggestCodes", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "name": { "maxLength": 200, "minLength": 1, "type": "string" }, "stem": { "pattern": "^[A-Za-z0-9-]{0,15}[A-Za-z-]$", "type": "string" }, "typeKey": { "minLength": 1, "type": "string" } }, "required": ["name"], "type": "object" } } }, "description": "Body" }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "suggestions": { "items": { "type": "string" }, "type": "array" } }, "required": ["suggestions"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "426": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["client_too_old"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message"], "type": "object" } } }, "description": "426" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Free codes for a new item: a stem followed by the next unused numbers", "tags": ["mobileInventory"] } }, "/mobile/inventory/document-ingestions/{id}": { "delete": { "operationId": "mobileInventory.dismissDocumentIngestion", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["id"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Dismiss an upload that is pending or failed", "tags": ["mobileInventory"] } }, "/mobile/inventory/documents/{id}": { "delete": { "operationId": "mobileInventory.unlinkItemDocument", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["id"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Unlink a document from its item; the Paperless document is kept", "tags": ["mobileInventory"] }, "patch": { "operationId": "mobileInventory.updateItemDocument", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "documentType": { "enum": ["receipt", "warranty", "manual", "invoice", "other"], "type": "string" }, "title": { "maxLength": 128, "minLength": 1, "type": "string" } }, "type": "object" } } }, "description": "Body" }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "createdAt": { "type": "string" }, "documentType": { "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "paperlessDocumentId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "title": { "nullable": true, "type": "string" } }, "required": ["id", "paperlessDocumentId", "documentType", "title", "createdAt"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "412": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "412" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Change a linked document's kind or title; a title change is made in Paperless first", "tags": ["mobileInventory"] } }, "/mobile/inventory/items": { "get": { "operationId": "mobileInventory.listItems", "parameters": [ { "in": "query", "name": "cursor", "schema": { "type": "string" } }, { "in": "query", "name": "limit", "required": true, "schema": { "default": 50, "exclusiveMinimum": true, "maximum": 100, "minimum": 0, "type": "integer" } }, { "in": "query", "name": "typeKey", "schema": { "type": "string" } }, { "in": "query", "name": "placementKind", "schema": { "enum": ["location", "container", "hand"], "type": "string" } }, { "in": "query", "name": "locationId", "schema": { "type": "string" } }, { "in": "query", "name": "containingItemId", "schema": { "type": "string" } }, { "in": "query", "name": "ids", "schema": { "pattern": "^[^,\\s]+(,[^,\\s]+)*$", "type": "string" } }, { "in": "query", "name": "includeInactive", "schema": { "type": "boolean" } }, { "in": "query", "name": "q", "schema": { "maxLength": 200, "minLength": 1, "type": "string" } }, { "in": "query", "name": "untyped", "schema": { "enum": ["true", "false"], "type": "string" } }, { "in": "query", "name": "isContainer", "schema": { "enum": ["true", "false"], "type": "string" } }, { "in": "query", "name": "access", "schema": { "enum": ["open", "closed"], "type": "string" } }, { "in": "query", "name": "isFull", "schema": { "enum": ["true", "false"], "type": "string" } }, { "in": "query", "name": "lifecycle", "schema": { "enum": ["active", "retired", "discarded", "lost", "destroyed"], "type": "string" } }, { "in": "query", "name": "legacyLabelOf", "schema": { "minLength": 1, "type": "string" } }, { "in": "query", "name": "within", "schema": { "minLength": 1, "type": "string" } }, { "in": "query", "name": "effectiveLocationId", "schema": { "minLength": 1, "type": "string" } }, { "in": "query", "name": "sort", "schema": { "enum": ["name", "updated", "type", "where", "packing"], "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "contentCounts": { "additionalProperties": { "additionalProperties": false, "properties": { "deep": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "direct": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["direct", "deep"], "type": "object" }, "type": "object" }, "hiddenInactiveCount": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "items": { "items": { "additionalProperties": false, "properties": { "access": { "enum": ["open", "closed", null], "nullable": true, "type": "string" }, "catalogueRevision": { "default": null, "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "code": { "nullable": true, "type": "string" }, "computedValues": { "default": [], "items": { "oneOf": [ { "additionalProperties": false, "properties": { "catalogueRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "dependencies": { "items": { "additionalProperties": false, "properties": { "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "itemId": { "type": "string" }, "revision": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": ["itemId", "fieldId", "revision"], "type": "object" }, "type": "array" }, "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "source": { "enum": ["computed"], "type": "string" }, "state": { "enum": ["ok"], "type": "string" }, "traversedItemIds": { "items": { "type": "string" }, "type": "array" }, "values": { "items": {}, "maxItems": 1, "minItems": 1, "type": "array" } }, "required": [ "fieldId", "source", "catalogueRevision", "dependencies", "traversedItemIds", "state", "values" ], "type": "object" }, { "additionalProperties": false, "properties": { "catalogueRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "dependencies": { "items": { "additionalProperties": false, "properties": { "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "itemId": { "type": "string" }, "revision": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": ["itemId", "fieldId", "revision"], "type": "object" }, "type": "array" }, "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "override": { "additionalProperties": false, "properties": { "catalogueRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["catalogueRevision"], "type": "object" }, "source": { "enum": ["computed"], "type": "string" }, "state": { "enum": ["overridden"], "type": "string" }, "traversedItemIds": { "items": { "type": "string" }, "type": "array" }, "values": { "items": {}, "maxItems": 1, "minItems": 1, "type": "array" } }, "required": [ "fieldId", "source", "catalogueRevision", "dependencies", "traversedItemIds", "state", "values", "override" ], "type": "object" }, { "additionalProperties": false, "properties": { "catalogueRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "dependencies": { "items": { "additionalProperties": false, "properties": { "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "itemId": { "type": "string" }, "revision": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": ["itemId", "fieldId", "revision"], "type": "object" }, "type": "array" }, "failedFieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "missingInputs": { "items": { "additionalProperties": false, "properties": { "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "itemId": { "type": "string" }, "reason": { "type": "string" } }, "required": ["reason", "fieldId", "itemId"], "type": "object" }, "type": "array" }, "reason": { "type": "string" }, "source": { "enum": ["computed"], "type": "string" }, "state": { "enum": ["unavailable"], "type": "string" }, "traversedItemIds": { "items": { "type": "string" }, "type": "array" } }, "required": [ "fieldId", "source", "catalogueRevision", "dependencies", "traversedItemIds", "state", "reason", "failedFieldId" ], "type": "object" } ] }, "type": "array" }, "createdAt": { "type": "string" }, "deletedAt": { "nullable": true, "type": "string" }, "documentTitles": { "items": { "type": "string" }, "type": "array" }, "documentsStatus": { "enum": ["linked", "none", "unavailable"], "type": "string" }, "externalIds": { "items": { "additionalProperties": false, "properties": { "kind": { "type": "string" }, "value": { "type": "string" } }, "required": ["kind", "value"], "type": "object" }, "type": "array" }, "fieldValues": { "items": { "additionalProperties": false, "properties": { "catalogueRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "source": { "enum": ["stored", "override"], "type": "string" }, "values": { "items": {}, "type": "array" } }, "required": ["fieldId", "source", "catalogueRevision", "values"], "type": "object" }, "type": "array" }, "fields": { "additionalProperties": {}, "type": "object" }, "id": { "type": "string" }, "isContainer": { "type": "boolean" }, "isFull": { "nullable": true, "type": "boolean" }, "legacyType": { "nullable": true, "type": "string" }, "lifecycle": { "type": "string" }, "lifecycleChangedAt": { "nullable": true, "type": "string" }, "name": { "type": "string" }, "note": { "nullable": true, "type": "string" }, "photos": { "items": { "additionalProperties": false, "properties": { "caption": { "nullable": true, "type": "string" }, "sha256": { "type": "string" } }, "required": ["sha256", "caption"], "type": "object" }, "type": "array" }, "placement": { "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["location"], "type": "string" }, "locationId": { "type": "string" } }, "required": ["kind", "locationId"], "type": "object" }, { "additionalProperties": false, "properties": { "itemId": { "type": "string" }, "kind": { "enum": ["container"], "type": "string" } }, "required": ["kind", "itemId"], "type": "object" }, { "additionalProperties": false, "properties": { "kind": { "enum": ["hand"], "type": "string" } }, "required": ["kind"], "type": "object" } ] }, "previousPlacement": { "nullable": true, "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["location"], "type": "string" }, "locationId": { "type": "string" } }, "required": ["kind", "locationId"], "type": "object" }, { "additionalProperties": false, "properties": { "itemId": { "type": "string" }, "kind": { "enum": ["container"], "type": "string" } }, "required": ["kind", "itemId"], "type": "object" } ] }, "provenance": { "additionalProperties": false, "nullable": true, "properties": { "merchant": { "nullable": true, "type": "string" }, "price": { "nullable": true, "type": "number" }, "purchasedOn": { "nullable": true, "type": "string" }, "transactionUri": { "nullable": true, "type": "string" }, "warrantyExpires": { "nullable": true, "type": "string" } }, "required": [ "merchant", "price", "purchasedOn", "warrantyExpires", "transactionUri" ], "type": "object" }, "quantity": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "revision": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "seq": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "typeId": { "format": "uuid", "nullable": true, "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "typeKey": { "nullable": true, "type": "string" }, "updatedAt": { "type": "string" } }, "required": [ "id", "revision", "seq", "name", "typeId", "catalogueRevision", "typeKey", "legacyType", "fieldValues", "computedValues", "fields", "note", "code", "externalIds", "quantity", "lifecycle", "lifecycleChangedAt", "placement", "previousPlacement", "isContainer", "access", "isFull", "photos", "provenance", "documentsStatus", "documentTitles", "createdAt", "updatedAt", "deletedAt" ], "type": "object" }, "type": "array" }, "nextCursor": { "nullable": true, "type": "string" }, "total": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "unfilteredTotal": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": [ "items", "contentCounts", "nextCursor", "total", "unfilteredTotal", "hiddenInactiveCount" ], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "One bounded, filtered page of live inventory items", "tags": ["mobileInventory"] } }, "/mobile/inventory/items/{id}/documents": { "get": { "operationId": "mobileInventory.listItemDocuments", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "minLength": 1, "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "allowedMimeTypes": { "items": { "type": "string" }, "nullable": true, "type": "array" }, "failed": { "items": { "additionalProperties": false, "properties": { "createdAt": { "type": "string" }, "documentType": { "type": "string" }, "fileName": { "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "reason": { "nullable": true, "type": "string" }, "state": { "enum": ["pending", "failed"], "type": "string" }, "title": { "nullable": true, "type": "string" } }, "required": [ "id", "documentType", "title", "fileName", "state", "reason", "createdAt" ], "type": "object" }, "type": "array" }, "linked": { "items": { "additionalProperties": false, "properties": { "createdAt": { "type": "string" }, "documentType": { "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "missing": { "nullable": true, "type": "boolean" }, "paperlessDocumentId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "title": { "nullable": true, "type": "string" } }, "required": [ "id", "paperlessDocumentId", "documentType", "title", "createdAt", "missing" ], "type": "object" }, "type": "array" }, "maxUploadBytes": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "pending": { "items": { "additionalProperties": false, "properties": { "createdAt": { "type": "string" }, "documentType": { "type": "string" }, "fileName": { "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "reason": { "nullable": true, "type": "string" }, "state": { "enum": ["pending", "failed"], "type": "string" }, "title": { "nullable": true, "type": "string" } }, "required": [ "id", "documentType", "title", "fileName", "state", "reason", "createdAt" ], "type": "object" }, "type": "array" } }, "required": ["maxUploadBytes", "allowedMimeTypes", "linked", "pending", "failed"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "An item's linked documents, and its uploads still pending or failed", "tags": ["mobileInventory"] } }, "/mobile/inventory/items/{id}/history": { "get": { "operationId": "mobileInventory.itemHistory", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "minLength": 1, "type": "string" } }, { "in": "query", "name": "cursor", "schema": { "type": "string" } }, { "in": "query", "name": "limit", "schema": { "maximum": 500, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "events": { "items": { "additionalProperties": false, "properties": { "actor": { "additionalProperties": false, "properties": { "kind": { "type": "string" }, "label": { "type": "string" } }, "required": ["kind", "label"], "type": "object" }, "after": { "additionalProperties": {}, "properties": { "placement": { "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["location"], "type": "string" }, "locationId": { "type": "string" } }, "required": ["kind", "locationId"], "type": "object" }, { "additionalProperties": false, "properties": { "itemId": { "type": "string" }, "kind": { "enum": ["container"], "type": "string" } }, "required": ["kind", "itemId"], "type": "object" }, { "additionalProperties": false, "properties": { "kind": { "enum": ["hand"], "type": "string" } }, "required": ["kind"], "type": "object" } ] }, "previousPlacement": { "nullable": true, "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["location"], "type": "string" }, "locationId": { "type": "string" } }, "required": ["kind", "locationId"], "type": "object" }, { "additionalProperties": false, "properties": { "itemId": { "type": "string" }, "kind": { "enum": ["container"], "type": "string" } }, "required": ["kind", "itemId"], "type": "object" } ] } }, "type": "object" }, "before": { "additionalProperties": {}, "properties": { "placement": { "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["location"], "type": "string" }, "locationId": { "type": "string" } }, "required": ["kind", "locationId"], "type": "object" }, { "additionalProperties": false, "properties": { "itemId": { "type": "string" }, "kind": { "enum": ["container"], "type": "string" } }, "required": ["kind", "itemId"], "type": "object" }, { "additionalProperties": false, "properties": { "kind": { "enum": ["hand"], "type": "string" } }, "required": ["kind"], "type": "object" } ] }, "previousPlacement": { "nullable": true, "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["location"], "type": "string" }, "locationId": { "type": "string" } }, "required": ["kind", "locationId"], "type": "object" }, { "additionalProperties": false, "properties": { "itemId": { "type": "string" }, "kind": { "enum": ["container"], "type": "string" } }, "required": ["kind", "itemId"], "type": "object" } ] } }, "type": "object" }, "clientTime": { "nullable": true, "type": "string" }, "compensatesSeq": { "maximum": 9007199254740991, "minimum": -9007199254740991, "nullable": true, "type": "integer" }, "entityId": { "type": "string" }, "entityKind": { "enum": ["item", "location"], "type": "string" }, "fields": { "items": { "type": "string" }, "type": "array" }, "kind": { "type": "string" }, "reason": { "nullable": true, "type": "string" }, "seq": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "serverTime": { "type": "string" }, "undoable": { "type": "boolean" } }, "required": [ "seq", "entityKind", "entityId", "kind", "fields", "before", "after", "reason", "actor", "clientTime", "serverTime", "compensatesSeq", "undoable" ], "type": "object" }, "type": "array" }, "nextCursor": { "nullable": true, "type": "string" } }, "required": ["events", "nextCursor"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "426": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["client_too_old"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message"], "type": "object" } } }, "description": "426" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "One item's history, newest first", "tags": ["mobileInventory"] } }, "/mobile/inventory/items/{id}/parts": { "get": { "operationId": "mobileInventory.itemParts", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "minLength": 1, "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "assembly": { "additionalProperties": false, "nullable": true, "properties": { "code": { "nullable": true, "type": "string" }, "itemId": { "type": "string" }, "name": { "type": "string" } }, "required": ["itemId", "name", "code"], "type": "object" }, "canHaveParts": { "type": "boolean" }, "parts": { "items": { "additionalProperties": false, "properties": { "code": { "nullable": true, "type": "string" }, "itemId": { "type": "string" }, "lifecycle": { "type": "string" }, "name": { "type": "string" }, "placement": { "additionalProperties": false, "properties": { "containingItemId": { "nullable": true, "type": "string" }, "containingItemName": { "nullable": true, "type": "string" }, "kind": { "enum": ["location", "container", "hand"], "type": "string" }, "locationId": { "nullable": true, "type": "string" }, "locationName": { "nullable": true, "type": "string" } }, "required": [ "kind", "locationId", "locationName", "containingItemId", "containingItemName" ], "type": "object" }, "typeId": { "nullable": true, "type": "string" } }, "required": ["itemId", "name", "code", "typeId", "lifecycle", "placement"], "type": "object" }, "type": "array" } }, "required": ["canHaveParts", "assembly", "parts"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "The assembly an item is a part of, and its own parts with where each one is", "tags": ["mobileInventory"] }, "post": { "operationId": "mobileInventory.addItemPart", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "minLength": 1, "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "partItemId": { "minLength": 1, "type": "string" } }, "required": ["partItemId"], "type": "object" } } }, "description": "Body" }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "assembly": { "additionalProperties": false, "nullable": true, "properties": { "code": { "nullable": true, "type": "string" }, "itemId": { "type": "string" }, "name": { "type": "string" } }, "required": ["itemId", "name", "code"], "type": "object" }, "canHaveParts": { "type": "boolean" }, "parts": { "items": { "additionalProperties": false, "properties": { "code": { "nullable": true, "type": "string" }, "itemId": { "type": "string" }, "lifecycle": { "type": "string" }, "name": { "type": "string" }, "placement": { "additionalProperties": false, "properties": { "containingItemId": { "nullable": true, "type": "string" }, "containingItemName": { "nullable": true, "type": "string" }, "kind": { "enum": ["location", "container", "hand"], "type": "string" }, "locationId": { "nullable": true, "type": "string" }, "locationName": { "nullable": true, "type": "string" } }, "required": [ "kind", "locationId", "locationName", "containingItemId", "containingItemName" ], "type": "object" }, "typeId": { "nullable": true, "type": "string" } }, "required": ["itemId", "name", "code", "typeId", "lifecycle", "placement"], "type": "object" }, "type": "array" } }, "required": ["canHaveParts", "assembly", "parts"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "409": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "409" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Make an existing item a part of this assembly", "tags": ["mobileInventory"] } }, "/mobile/inventory/items/{id}/parts/{partItemId}": { "delete": { "operationId": "mobileInventory.removeItemPart", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "minLength": 1, "type": "string" } }, { "in": "path", "name": "partItemId", "required": true, "schema": { "minLength": 1, "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } }, "description": "Body" }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "assembly": { "additionalProperties": false, "nullable": true, "properties": { "code": { "nullable": true, "type": "string" }, "itemId": { "type": "string" }, "name": { "type": "string" } }, "required": ["itemId", "name", "code"], "type": "object" }, "canHaveParts": { "type": "boolean" }, "parts": { "items": { "additionalProperties": false, "properties": { "code": { "nullable": true, "type": "string" }, "itemId": { "type": "string" }, "lifecycle": { "type": "string" }, "name": { "type": "string" }, "placement": { "additionalProperties": false, "properties": { "containingItemId": { "nullable": true, "type": "string" }, "containingItemName": { "nullable": true, "type": "string" }, "kind": { "enum": ["location", "container", "hand"], "type": "string" }, "locationId": { "nullable": true, "type": "string" }, "locationName": { "nullable": true, "type": "string" } }, "required": [ "kind", "locationId", "locationName", "containingItemId", "containingItemName" ], "type": "object" }, "typeId": { "nullable": true, "type": "string" } }, "required": ["itemId", "name", "code", "typeId", "lifecycle", "placement"], "type": "object" }, "type": "array" } }, "required": ["canHaveParts", "assembly", "parts"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Stop an item being a part of this assembly; the item itself is kept", "tags": ["mobileInventory"] } }, "/mobile/inventory/media/{sha256}": { "get": { "operationId": "mobileInventory.getMedia", "parameters": [ { "in": "path", "name": "sha256", "required": true, "schema": { "minLength": 1, "type": "string" } }, { "in": "query", "name": "variant", "schema": { "enum": ["full", "thumb", "medium"], "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "byteLength": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "dataBase64": { "type": "string" }, "mediaType": { "type": "string" }, "sha256": { "type": "string" } }, "required": ["sha256", "mediaType", "byteLength", "dataBase64"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "A photo's bytes, base64, for a detail screen or a thumbnail row", "tags": ["mobileInventory"] }, "put": { "operationId": "mobileInventory.putMedia", "parameters": [ { "in": "path", "name": "sha256", "required": true, "schema": { "minLength": 1, "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "dataBase64": { "minLength": 1, "type": "string" }, "mediaType": { "enum": ["image/jpeg", "image/heic"], "type": "string" } }, "required": ["mediaType", "dataBase64"], "type": "object" } } }, "description": "Body" }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "alreadyStored": { "type": "boolean" }, "sha256": { "type": "string" } }, "required": ["sha256", "alreadyStored"], "type": "object" } } }, "description": "200" }, "201": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "alreadyStored": { "type": "boolean" }, "sha256": { "type": "string" } }, "required": ["sha256", "alreadyStored"], "type": "object" } } }, "description": "201" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "413": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["payload_too_large"], "type": "string" }, "maxBytes": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "message": { "type": "string" } }, "required": ["code", "maxBytes", "message"], "type": "object" } } }, "description": "413" }, "415": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "415" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Store a photo's bytes, content-addressed by their own sha256", "tags": ["mobileInventory"] } }, "/mobile/inventory/mutations": { "post": { "operationId": "mobileInventory.mutations", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "mutations": { "items": { "additionalProperties": false, "properties": { "args": {}, "baseRevision": { "maximum": 9007199254740991, "minimum": 1, "nullable": true, "type": "integer" }, "catalogueRevision": { "maximum": 9007199254740991, "minimum": 1, "nullable": true, "type": "integer" }, "clientTime": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", "type": "string" }, "dependsOn": { "default": [], "items": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "maxItems": 50, "type": "array" }, "entityId": { "maxLength": 128, "minLength": 1, "type": "string" }, "mutationId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "op": { "maxLength": 64, "minLength": 1, "type": "string" } }, "required": [ "mutationId", "op", "entityId", "dependsOn", "clientTime", "args" ], "type": "object" }, "maxItems": 50, "minItems": 1, "type": "array" } }, "required": ["mutations"], "type": "object" } } }, "description": "Body" }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "highWaterSeq": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "outcomes": { "items": { "anyOf": [ { "additionalProperties": false, "properties": { "converged": { "type": "boolean" }, "mutationId": { "type": "string" }, "revision": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "seq": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "status": { "enum": ["applied"], "type": "string" } }, "required": ["mutationId", "status", "revision", "seq", "converged"], "type": "object" }, { "oneOf": [ { "additionalProperties": false, "properties": { "at": { "type": "string" }, "currentRevision": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "field": { "type": "string" }, "kind": { "enum": ["field"], "type": "string" }, "mine": {}, "mutationId": { "type": "string" }, "source": { "additionalProperties": false, "properties": { "kind": { "type": "string" }, "label": { "type": "string" } }, "required": ["kind", "label"], "type": "object" }, "status": { "enum": ["conflict"], "type": "string" }, "theirs": {} }, "required": [ "mutationId", "status", "kind", "field", "source", "at", "currentRevision", "mine", "theirs" ], "type": "object" }, { "additionalProperties": false, "properties": { "heldBy": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "required": ["id", "name"], "type": "object" }, "kind": { "enum": ["code_collision"], "type": "string" }, "mutationId": { "type": "string" }, "status": { "enum": ["conflict"], "type": "string" }, "suggestedCode": { "nullable": true, "type": "string" } }, "required": [ "mutationId", "status", "kind", "heldBy", "suggestedCode" ], "type": "object" }, { "additionalProperties": false, "properties": { "at": { "type": "string" }, "kind": { "enum": ["deleted"], "type": "string" }, "mutationId": { "type": "string" }, "source": { "additionalProperties": false, "properties": { "kind": { "type": "string" }, "label": { "type": "string" } }, "required": ["kind", "label"], "type": "object" }, "status": { "enum": ["conflict"], "type": "string" } }, "required": ["mutationId", "status", "kind", "source", "at"], "type": "object" } ] }, { "additionalProperties": false, "properties": { "catalogueChanges": { "items": { "additionalProperties": false, "properties": { "change": { "type": "string" }, "definition": { "type": "string" }, "fieldId": { "nullable": true, "type": "string" }, "id": { "type": "string" }, "replacementId": { "nullable": true, "type": "string" }, "revision": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "typeId": { "nullable": true, "type": "string" } }, "required": [ "definition", "id", "typeId", "fieldId", "change", "replacementId", "revision" ], "type": "object" }, "type": "array" }, "incomingReference": { "additionalProperties": false, "properties": { "fieldId": { "type": "string" }, "itemId": { "type": "string" } }, "required": ["itemId", "fieldId"], "type": "object" }, "message": { "type": "string" }, "mutationId": { "type": "string" }, "reason": { "type": "string" }, "status": { "enum": ["rejected"], "type": "string" } }, "required": ["mutationId", "status", "reason", "message"], "type": "object" }, { "additionalProperties": false, "properties": { "mutationId": { "type": "string" }, "status": { "enum": ["deferred"], "type": "string" }, "waitingOn": { "type": "string" } }, "required": ["mutationId", "status", "waitingOn"], "type": "object" } ] }, "type": "array" } }, "required": ["outcomes", "highWaterSeq"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "413": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["payload_too_large"], "type": "string" }, "maxBytes": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "message": { "type": "string" } }, "required": ["code", "maxBytes", "message"], "type": "object" } } }, "description": "413" }, "426": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["client_too_old"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message"], "type": "object" } } }, "description": "426" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Apply up to 50 mutations in order, each in its own transaction, idempotently", "tags": ["mobileInventory"] } }, "/mobile/inventory/sync/changes": { "get": { "operationId": "mobileInventory.changes", "parameters": [ { "in": "query", "name": "since", "required": true, "schema": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, { "in": "query", "name": "epoch", "required": true, "schema": { "minLength": 1, "type": "string" } }, { "in": "query", "name": "limit", "schema": { "maximum": 500, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "catalogueRevision": { "default": null, "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "catalogueVersion": { "type": "string" }, "epoch": { "type": "string" }, "events": { "items": { "additionalProperties": false, "properties": { "actor": { "additionalProperties": false, "properties": { "kind": { "type": "string" }, "label": { "type": "string" } }, "required": ["kind", "label"], "type": "object" }, "after": { "additionalProperties": {}, "properties": { "placement": { "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["location"], "type": "string" }, "locationId": { "type": "string" } }, "required": ["kind", "locationId"], "type": "object" }, { "additionalProperties": false, "properties": { "itemId": { "type": "string" }, "kind": { "enum": ["container"], "type": "string" } }, "required": ["kind", "itemId"], "type": "object" }, { "additionalProperties": false, "properties": { "kind": { "enum": ["hand"], "type": "string" } }, "required": ["kind"], "type": "object" } ] }, "previousPlacement": { "nullable": true, "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["location"], "type": "string" }, "locationId": { "type": "string" } }, "required": ["kind", "locationId"], "type": "object" }, { "additionalProperties": false, "properties": { "itemId": { "type": "string" }, "kind": { "enum": ["container"], "type": "string" } }, "required": ["kind", "itemId"], "type": "object" } ] } }, "type": "object" }, "before": { "additionalProperties": {}, "properties": { "placement": { "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["location"], "type": "string" }, "locationId": { "type": "string" } }, "required": ["kind", "locationId"], "type": "object" }, { "additionalProperties": false, "properties": { "itemId": { "type": "string" }, "kind": { "enum": ["container"], "type": "string" } }, "required": ["kind", "itemId"], "type": "object" }, { "additionalProperties": false, "properties": { "kind": { "enum": ["hand"], "type": "string" } }, "required": ["kind"], "type": "object" } ] }, "previousPlacement": { "nullable": true, "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["location"], "type": "string" }, "locationId": { "type": "string" } }, "required": ["kind", "locationId"], "type": "object" }, { "additionalProperties": false, "properties": { "itemId": { "type": "string" }, "kind": { "enum": ["container"], "type": "string" } }, "required": ["kind", "itemId"], "type": "object" } ] } }, "type": "object" }, "clientTime": { "nullable": true, "type": "string" }, "compensatesSeq": { "maximum": 9007199254740991, "minimum": -9007199254740991, "nullable": true, "type": "integer" }, "entityId": { "type": "string" }, "entityKind": { "enum": ["item", "location"], "type": "string" }, "fields": { "items": { "type": "string" }, "type": "array" }, "kind": { "type": "string" }, "reason": { "nullable": true, "type": "string" }, "seq": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "serverTime": { "type": "string" }, "undoable": { "type": "boolean" } }, "required": [ "seq", "entityKind", "entityId", "kind", "fields", "before", "after", "reason", "actor", "clientTime", "serverTime", "compensatesSeq", "undoable" ], "type": "object" }, "type": "array" }, "hasMore": { "type": "boolean" }, "issues": { "items": { "additionalProperties": false, "properties": { "code": { "type": "string" }, "fieldId": { "nullable": true, "type": "string" }, "fieldKey": { "nullable": true, "type": "string" }, "itemApplied": { "type": "boolean" }, "itemId": { "type": "string" }, "itemName": { "type": "string" }, "message": { "type": "string" }, "retryable": { "type": "boolean" }, "seq": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": [ "itemId", "itemName", "seq", "code", "fieldId", "fieldKey", "message", "itemApplied", "retryable" ], "type": "object" }, "type": "array" }, "items": { "items": { "additionalProperties": false, "properties": { "access": { "enum": ["open", "closed", null], "nullable": true, "type": "string" }, "catalogueRevision": { "default": null, "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "code": { "nullable": true, "type": "string" }, "computedValues": { "default": [], "items": { "oneOf": [ { "additionalProperties": false, "properties": { "catalogueRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "dependencies": { "items": { "additionalProperties": false, "properties": { "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "itemId": { "type": "string" }, "revision": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": ["itemId", "fieldId", "revision"], "type": "object" }, "type": "array" }, "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "source": { "enum": ["computed"], "type": "string" }, "state": { "enum": ["ok"], "type": "string" }, "traversedItemIds": { "items": { "type": "string" }, "type": "array" }, "values": { "items": {}, "maxItems": 1, "minItems": 1, "type": "array" } }, "required": [ "fieldId", "source", "catalogueRevision", "dependencies", "traversedItemIds", "state", "values" ], "type": "object" }, { "additionalProperties": false, "properties": { "catalogueRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "dependencies": { "items": { "additionalProperties": false, "properties": { "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "itemId": { "type": "string" }, "revision": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": ["itemId", "fieldId", "revision"], "type": "object" }, "type": "array" }, "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "override": { "additionalProperties": false, "properties": { "catalogueRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["catalogueRevision"], "type": "object" }, "source": { "enum": ["computed"], "type": "string" }, "state": { "enum": ["overridden"], "type": "string" }, "traversedItemIds": { "items": { "type": "string" }, "type": "array" }, "values": { "items": {}, "maxItems": 1, "minItems": 1, "type": "array" } }, "required": [ "fieldId", "source", "catalogueRevision", "dependencies", "traversedItemIds", "state", "values", "override" ], "type": "object" }, { "additionalProperties": false, "properties": { "catalogueRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "dependencies": { "items": { "additionalProperties": false, "properties": { "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "itemId": { "type": "string" }, "revision": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": ["itemId", "fieldId", "revision"], "type": "object" }, "type": "array" }, "failedFieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "missingInputs": { "items": { "additionalProperties": false, "properties": { "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "itemId": { "type": "string" }, "reason": { "type": "string" } }, "required": ["reason", "fieldId", "itemId"], "type": "object" }, "type": "array" }, "reason": { "type": "string" }, "source": { "enum": ["computed"], "type": "string" }, "state": { "enum": ["unavailable"], "type": "string" }, "traversedItemIds": { "items": { "type": "string" }, "type": "array" } }, "required": [ "fieldId", "source", "catalogueRevision", "dependencies", "traversedItemIds", "state", "reason", "failedFieldId" ], "type": "object" } ] }, "type": "array" }, "createdAt": { "type": "string" }, "deletedAt": { "nullable": true, "type": "string" }, "documentTitles": { "items": { "type": "string" }, "type": "array" }, "documentsStatus": { "enum": ["linked", "none", "unavailable"], "type": "string" }, "externalIds": { "items": { "additionalProperties": false, "properties": { "kind": { "type": "string" }, "value": { "type": "string" } }, "required": ["kind", "value"], "type": "object" }, "type": "array" }, "fieldValues": { "items": { "additionalProperties": false, "properties": { "catalogueRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "source": { "enum": ["stored", "override"], "type": "string" }, "values": { "items": {}, "type": "array" } }, "required": ["fieldId", "source", "catalogueRevision", "values"], "type": "object" }, "type": "array" }, "fields": { "additionalProperties": {}, "type": "object" }, "id": { "type": "string" }, "isContainer": { "type": "boolean" }, "isFull": { "nullable": true, "type": "boolean" }, "legacyType": { "nullable": true, "type": "string" }, "lifecycle": { "type": "string" }, "lifecycleChangedAt": { "nullable": true, "type": "string" }, "name": { "type": "string" }, "note": { "nullable": true, "type": "string" }, "photos": { "items": { "additionalProperties": false, "properties": { "caption": { "nullable": true, "type": "string" }, "sha256": { "type": "string" } }, "required": ["sha256", "caption"], "type": "object" }, "type": "array" }, "placement": { "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["location"], "type": "string" }, "locationId": { "type": "string" } }, "required": ["kind", "locationId"], "type": "object" }, { "additionalProperties": false, "properties": { "itemId": { "type": "string" }, "kind": { "enum": ["container"], "type": "string" } }, "required": ["kind", "itemId"], "type": "object" }, { "additionalProperties": false, "properties": { "kind": { "enum": ["hand"], "type": "string" } }, "required": ["kind"], "type": "object" } ] }, "previousPlacement": { "nullable": true, "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["location"], "type": "string" }, "locationId": { "type": "string" } }, "required": ["kind", "locationId"], "type": "object" }, { "additionalProperties": false, "properties": { "itemId": { "type": "string" }, "kind": { "enum": ["container"], "type": "string" } }, "required": ["kind", "itemId"], "type": "object" } ] }, "provenance": { "additionalProperties": false, "nullable": true, "properties": { "merchant": { "nullable": true, "type": "string" }, "price": { "nullable": true, "type": "number" }, "purchasedOn": { "nullable": true, "type": "string" }, "transactionUri": { "nullable": true, "type": "string" }, "warrantyExpires": { "nullable": true, "type": "string" } }, "required": [ "merchant", "price", "purchasedOn", "warrantyExpires", "transactionUri" ], "type": "object" }, "quantity": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "revision": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "seq": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "typeId": { "format": "uuid", "nullable": true, "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "typeKey": { "nullable": true, "type": "string" }, "updatedAt": { "type": "string" } }, "required": [ "id", "revision", "seq", "name", "typeId", "catalogueRevision", "typeKey", "legacyType", "fieldValues", "computedValues", "fields", "note", "code", "externalIds", "quantity", "lifecycle", "lifecycleChangedAt", "placement", "previousPlacement", "isContainer", "access", "isFull", "photos", "provenance", "documentsStatus", "documentTitles", "createdAt", "updatedAt", "deletedAt" ], "type": "object" }, "type": "array" }, "locations": { "items": { "additionalProperties": false, "properties": { "deletedAt": { "nullable": true, "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "parentId": { "nullable": true, "type": "string" }, "revision": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "seq": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "sortOrder": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": [ "id", "revision", "seq", "name", "parentId", "sortOrder", "deletedAt" ], "type": "object" }, "type": "array" }, "minimumProtocol": { "default": 1, "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "nextSince": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": [ "epoch", "minimumProtocol", "items", "locations", "events", "nextSince", "hasMore", "catalogueVersion", "catalogueRevision" ], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "409": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["resync_required"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message"], "type": "object" } } }, "description": "409" }, "426": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["client_too_old"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message"], "type": "object" } } }, "description": "426" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Rows and events changed after `since`, tombstones included, in seq order", "tags": ["mobileInventory"] } }, "/mobile/inventory/sync/items/{id}": { "get": { "operationId": "mobileInventory.item", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "minLength": 1, "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "catalogueRevision": { "default": null, "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "catalogueVersion": { "default": "", "type": "string" }, "issues": { "items": { "additionalProperties": false, "properties": { "code": { "type": "string" }, "fieldId": { "nullable": true, "type": "string" }, "fieldKey": { "nullable": true, "type": "string" }, "itemApplied": { "type": "boolean" }, "itemId": { "type": "string" }, "itemName": { "type": "string" }, "message": { "type": "string" }, "retryable": { "type": "boolean" }, "seq": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": [ "itemId", "itemName", "seq", "code", "fieldId", "fieldKey", "message", "itemApplied", "retryable" ], "type": "object" }, "type": "array" }, "item": { "additionalProperties": false, "nullable": true, "properties": { "access": { "enum": ["open", "closed", null], "nullable": true, "type": "string" }, "catalogueRevision": { "default": null, "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "code": { "nullable": true, "type": "string" }, "computedValues": { "default": [], "items": { "oneOf": [ { "additionalProperties": false, "properties": { "catalogueRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "dependencies": { "items": { "additionalProperties": false, "properties": { "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "itemId": { "type": "string" }, "revision": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": ["itemId", "fieldId", "revision"], "type": "object" }, "type": "array" }, "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "source": { "enum": ["computed"], "type": "string" }, "state": { "enum": ["ok"], "type": "string" }, "traversedItemIds": { "items": { "type": "string" }, "type": "array" }, "values": { "items": {}, "maxItems": 1, "minItems": 1, "type": "array" } }, "required": [ "fieldId", "source", "catalogueRevision", "dependencies", "traversedItemIds", "state", "values" ], "type": "object" }, { "additionalProperties": false, "properties": { "catalogueRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "dependencies": { "items": { "additionalProperties": false, "properties": { "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "itemId": { "type": "string" }, "revision": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": ["itemId", "fieldId", "revision"], "type": "object" }, "type": "array" }, "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "override": { "additionalProperties": false, "properties": { "catalogueRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["catalogueRevision"], "type": "object" }, "source": { "enum": ["computed"], "type": "string" }, "state": { "enum": ["overridden"], "type": "string" }, "traversedItemIds": { "items": { "type": "string" }, "type": "array" }, "values": { "items": {}, "maxItems": 1, "minItems": 1, "type": "array" } }, "required": [ "fieldId", "source", "catalogueRevision", "dependencies", "traversedItemIds", "state", "values", "override" ], "type": "object" }, { "additionalProperties": false, "properties": { "catalogueRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "dependencies": { "items": { "additionalProperties": false, "properties": { "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "itemId": { "type": "string" }, "revision": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": ["itemId", "fieldId", "revision"], "type": "object" }, "type": "array" }, "failedFieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "missingInputs": { "items": { "additionalProperties": false, "properties": { "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "itemId": { "type": "string" }, "reason": { "type": "string" } }, "required": ["reason", "fieldId", "itemId"], "type": "object" }, "type": "array" }, "reason": { "type": "string" }, "source": { "enum": ["computed"], "type": "string" }, "state": { "enum": ["unavailable"], "type": "string" }, "traversedItemIds": { "items": { "type": "string" }, "type": "array" } }, "required": [ "fieldId", "source", "catalogueRevision", "dependencies", "traversedItemIds", "state", "reason", "failedFieldId" ], "type": "object" } ] }, "type": "array" }, "createdAt": { "type": "string" }, "deletedAt": { "nullable": true, "type": "string" }, "documentTitles": { "items": { "type": "string" }, "type": "array" }, "documentsStatus": { "enum": ["linked", "none", "unavailable"], "type": "string" }, "externalIds": { "items": { "additionalProperties": false, "properties": { "kind": { "type": "string" }, "value": { "type": "string" } }, "required": ["kind", "value"], "type": "object" }, "type": "array" }, "fieldValues": { "items": { "additionalProperties": false, "properties": { "catalogueRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "source": { "enum": ["stored", "override"], "type": "string" }, "values": { "items": {}, "type": "array" } }, "required": ["fieldId", "source", "catalogueRevision", "values"], "type": "object" }, "type": "array" }, "fields": { "additionalProperties": {}, "type": "object" }, "id": { "type": "string" }, "isContainer": { "type": "boolean" }, "isFull": { "nullable": true, "type": "boolean" }, "legacyType": { "nullable": true, "type": "string" }, "lifecycle": { "type": "string" }, "lifecycleChangedAt": { "nullable": true, "type": "string" }, "name": { "type": "string" }, "note": { "nullable": true, "type": "string" }, "photos": { "items": { "additionalProperties": false, "properties": { "caption": { "nullable": true, "type": "string" }, "sha256": { "type": "string" } }, "required": ["sha256", "caption"], "type": "object" }, "type": "array" }, "placement": { "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["location"], "type": "string" }, "locationId": { "type": "string" } }, "required": ["kind", "locationId"], "type": "object" }, { "additionalProperties": false, "properties": { "itemId": { "type": "string" }, "kind": { "enum": ["container"], "type": "string" } }, "required": ["kind", "itemId"], "type": "object" }, { "additionalProperties": false, "properties": { "kind": { "enum": ["hand"], "type": "string" } }, "required": ["kind"], "type": "object" } ] }, "previousPlacement": { "nullable": true, "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["location"], "type": "string" }, "locationId": { "type": "string" } }, "required": ["kind", "locationId"], "type": "object" }, { "additionalProperties": false, "properties": { "itemId": { "type": "string" }, "kind": { "enum": ["container"], "type": "string" } }, "required": ["kind", "itemId"], "type": "object" } ] }, "provenance": { "additionalProperties": false, "nullable": true, "properties": { "merchant": { "nullable": true, "type": "string" }, "price": { "nullable": true, "type": "number" }, "purchasedOn": { "nullable": true, "type": "string" }, "transactionUri": { "nullable": true, "type": "string" }, "warrantyExpires": { "nullable": true, "type": "string" } }, "required": [ "merchant", "price", "purchasedOn", "warrantyExpires", "transactionUri" ], "type": "object" }, "quantity": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "revision": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "seq": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "typeId": { "format": "uuid", "nullable": true, "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "typeKey": { "nullable": true, "type": "string" }, "updatedAt": { "type": "string" } }, "required": [ "id", "revision", "seq", "name", "typeId", "catalogueRevision", "typeKey", "legacyType", "fieldValues", "computedValues", "fields", "note", "code", "externalIds", "quantity", "lifecycle", "lifecycleChangedAt", "placement", "previousPlacement", "isContainer", "access", "isFull", "photos", "provenance", "documentsStatus", "documentTitles", "createdAt", "updatedAt", "deletedAt" ], "type": "object" } }, "required": ["item", "catalogueVersion", "catalogueRevision"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "426": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["client_too_old"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message"], "type": "object" } } }, "description": "426" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Read one item and any compatibility issues recorded while projecting it", "tags": ["mobileInventory"] } }, "/mobile/inventory/sync/ledger": { "post": { "operationId": "mobileInventory.reportLedger", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "attention": { "items": { "additionalProperties": false, "properties": { "code": { "additionalProperties": false, "properties": { "holder": { "type": "string" }, "suggested": { "type": "string" }, "wanted": { "type": "string" } }, "required": ["wanted", "holder", "suggested"], "type": "object" }, "held": { "additionalProperties": false, "properties": { "title": { "type": "string" }, "values": { "items": { "additionalProperties": false, "properties": { "field": { "type": "string" }, "fieldId": { "type": "string" }, "fit": { "type": "string" }, "recordId": { "type": "string" }, "recordKind": { "type": "string" }, "replacement": { "type": "string" }, "replacementTypeId": { "type": "string" }, "value": { "type": "string" }, "values": { "items": {}, "type": "array" } }, "required": ["field", "value", "fit"], "type": "object" }, "type": "array" } }, "required": ["title", "values"], "type": "object" }, "id": { "type": "string" }, "itemId": { "type": "string" }, "itemName": { "type": "string" }, "kind": { "type": "string" }, "mine": { "additionalProperties": false, "properties": { "at": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "source": { "type": "string" }, "target": { "additionalProperties": false, "properties": { "containerId": { "type": "string" }, "fieldId": { "type": "string" }, "kind": { "type": "string" }, "locationId": { "type": "string" }, "name": { "type": "string" }, "note": { "nullable": true, "type": "string" }, "values": { "items": {}, "nullable": true, "type": "array" } }, "required": ["kind"], "type": "object" }, "value": { "type": "string" } }, "required": ["value", "source", "at"], "type": "object" }, "openedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "photo": { "additionalProperties": false, "properties": { "limit": { "type": "string" }, "size": { "type": "string" } }, "required": ["size", "limit"], "type": "object" }, "problem": { "type": "string" }, "refused": { "additionalProperties": false, "properties": { "at": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "reason": { "type": "string" } }, "required": ["at", "reason"], "type": "object" }, "theirs": { "additionalProperties": false, "properties": { "at": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "source": { "type": "string" }, "target": { "additionalProperties": false, "properties": { "containerId": { "type": "string" }, "fieldId": { "type": "string" }, "kind": { "type": "string" }, "locationId": { "type": "string" }, "name": { "type": "string" }, "note": { "nullable": true, "type": "string" }, "values": { "items": {}, "nullable": true, "type": "array" } }, "required": ["kind"], "type": "object" }, "value": { "type": "string" } }, "required": ["value", "source", "at"], "type": "object" }, "typeId": { "type": "string" } }, "required": ["id", "kind", "itemId", "itemName", "openedAt", "problem"], "type": "object" }, "type": "array" }, "lastSyncAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "reportedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "resolved": { "items": { "additionalProperties": false, "properties": { "at": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "dropped": { "items": { "additionalProperties": false, "properties": { "field": { "type": "string" }, "fieldId": { "type": "string" }, "fit": { "type": "string" }, "recordId": { "type": "string" }, "recordKind": { "type": "string" }, "replacement": { "type": "string" }, "replacementTypeId": { "type": "string" }, "value": { "type": "string" }, "values": { "items": {}, "type": "array" } }, "required": ["field", "value", "fit"], "type": "object" }, "type": "array" }, "id": { "type": "string" }, "itemId": { "type": "string" }, "itemName": { "type": "string" }, "outcome": { "type": "string" } }, "required": ["id", "itemName", "outcome", "at"], "type": "object" }, "type": "array" }, "waiting": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "itemName": { "type": "string" }, "reason": { "additionalProperties": false, "properties": { "caseId": { "type": "string" }, "itemName": { "type": "string" }, "kind": { "type": "string" }, "on": { "type": "string" }, "revision": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": ["kind"], "type": "object" }, "since": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "summary": { "type": "string" } }, "required": ["id", "itemName", "summary", "since", "reason"], "type": "object" }, "type": "array" } }, "required": ["reportedAt", "attention", "waiting", "resolved"], "type": "object" } } }, "description": "Body" }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "stored": { "type": "boolean" } }, "required": ["stored"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "413": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["payload_too_large"], "type": "string" }, "maxBytes": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "message": { "type": "string" } }, "required": ["code", "maxBytes", "message"], "type": "object" } } }, "description": "413" }, "426": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["client_too_old"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message"], "type": "object" } } }, "description": "426" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Store a device's latest sync ledger report", "tags": ["mobileInventory"] } }, "/mobile/inventory/sync/snapshot": { "get": { "operationId": "mobileInventory.snapshot", "parameters": [ { "in": "query", "name": "cursor", "schema": { "type": "string" } }, { "in": "query", "name": "limit", "schema": { "maximum": 500, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "catalogueRevision": { "default": null, "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "catalogueVersion": { "type": "string" }, "epoch": { "type": "string" }, "highWaterSeq": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "issues": { "items": { "additionalProperties": false, "properties": { "code": { "type": "string" }, "fieldId": { "nullable": true, "type": "string" }, "fieldKey": { "nullable": true, "type": "string" }, "itemApplied": { "type": "boolean" }, "itemId": { "type": "string" }, "itemName": { "type": "string" }, "message": { "type": "string" }, "retryable": { "type": "boolean" }, "seq": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": [ "itemId", "itemName", "seq", "code", "fieldId", "fieldKey", "message", "itemApplied", "retryable" ], "type": "object" }, "type": "array" }, "items": { "items": { "additionalProperties": false, "properties": { "access": { "enum": ["open", "closed", null], "nullable": true, "type": "string" }, "catalogueRevision": { "default": null, "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "code": { "nullable": true, "type": "string" }, "computedValues": { "default": [], "items": { "oneOf": [ { "additionalProperties": false, "properties": { "catalogueRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "dependencies": { "items": { "additionalProperties": false, "properties": { "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "itemId": { "type": "string" }, "revision": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": ["itemId", "fieldId", "revision"], "type": "object" }, "type": "array" }, "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "source": { "enum": ["computed"], "type": "string" }, "state": { "enum": ["ok"], "type": "string" }, "traversedItemIds": { "items": { "type": "string" }, "type": "array" }, "values": { "items": {}, "maxItems": 1, "minItems": 1, "type": "array" } }, "required": [ "fieldId", "source", "catalogueRevision", "dependencies", "traversedItemIds", "state", "values" ], "type": "object" }, { "additionalProperties": false, "properties": { "catalogueRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "dependencies": { "items": { "additionalProperties": false, "properties": { "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "itemId": { "type": "string" }, "revision": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": ["itemId", "fieldId", "revision"], "type": "object" }, "type": "array" }, "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "override": { "additionalProperties": false, "properties": { "catalogueRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["catalogueRevision"], "type": "object" }, "source": { "enum": ["computed"], "type": "string" }, "state": { "enum": ["overridden"], "type": "string" }, "traversedItemIds": { "items": { "type": "string" }, "type": "array" }, "values": { "items": {}, "maxItems": 1, "minItems": 1, "type": "array" } }, "required": [ "fieldId", "source", "catalogueRevision", "dependencies", "traversedItemIds", "state", "values", "override" ], "type": "object" }, { "additionalProperties": false, "properties": { "catalogueRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "dependencies": { "items": { "additionalProperties": false, "properties": { "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "itemId": { "type": "string" }, "revision": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": ["itemId", "fieldId", "revision"], "type": "object" }, "type": "array" }, "failedFieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "missingInputs": { "items": { "additionalProperties": false, "properties": { "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "itemId": { "type": "string" }, "reason": { "type": "string" } }, "required": ["reason", "fieldId", "itemId"], "type": "object" }, "type": "array" }, "reason": { "type": "string" }, "source": { "enum": ["computed"], "type": "string" }, "state": { "enum": ["unavailable"], "type": "string" }, "traversedItemIds": { "items": { "type": "string" }, "type": "array" } }, "required": [ "fieldId", "source", "catalogueRevision", "dependencies", "traversedItemIds", "state", "reason", "failedFieldId" ], "type": "object" } ] }, "type": "array" }, "createdAt": { "type": "string" }, "deletedAt": { "nullable": true, "type": "string" }, "documentTitles": { "items": { "type": "string" }, "type": "array" }, "documentsStatus": { "enum": ["linked", "none", "unavailable"], "type": "string" }, "externalIds": { "items": { "additionalProperties": false, "properties": { "kind": { "type": "string" }, "value": { "type": "string" } }, "required": ["kind", "value"], "type": "object" }, "type": "array" }, "fieldValues": { "items": { "additionalProperties": false, "properties": { "catalogueRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "fieldId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "source": { "enum": ["stored", "override"], "type": "string" }, "values": { "items": {}, "type": "array" } }, "required": ["fieldId", "source", "catalogueRevision", "values"], "type": "object" }, "type": "array" }, "fields": { "additionalProperties": {}, "type": "object" }, "id": { "type": "string" }, "isContainer": { "type": "boolean" }, "isFull": { "nullable": true, "type": "boolean" }, "legacyType": { "nullable": true, "type": "string" }, "lifecycle": { "type": "string" }, "lifecycleChangedAt": { "nullable": true, "type": "string" }, "name": { "type": "string" }, "note": { "nullable": true, "type": "string" }, "photos": { "items": { "additionalProperties": false, "properties": { "caption": { "nullable": true, "type": "string" }, "sha256": { "type": "string" } }, "required": ["sha256", "caption"], "type": "object" }, "type": "array" }, "placement": { "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["location"], "type": "string" }, "locationId": { "type": "string" } }, "required": ["kind", "locationId"], "type": "object" }, { "additionalProperties": false, "properties": { "itemId": { "type": "string" }, "kind": { "enum": ["container"], "type": "string" } }, "required": ["kind", "itemId"], "type": "object" }, { "additionalProperties": false, "properties": { "kind": { "enum": ["hand"], "type": "string" } }, "required": ["kind"], "type": "object" } ] }, "previousPlacement": { "nullable": true, "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["location"], "type": "string" }, "locationId": { "type": "string" } }, "required": ["kind", "locationId"], "type": "object" }, { "additionalProperties": false, "properties": { "itemId": { "type": "string" }, "kind": { "enum": ["container"], "type": "string" } }, "required": ["kind", "itemId"], "type": "object" } ] }, "provenance": { "additionalProperties": false, "nullable": true, "properties": { "merchant": { "nullable": true, "type": "string" }, "price": { "nullable": true, "type": "number" }, "purchasedOn": { "nullable": true, "type": "string" }, "transactionUri": { "nullable": true, "type": "string" }, "warrantyExpires": { "nullable": true, "type": "string" } }, "required": [ "merchant", "price", "purchasedOn", "warrantyExpires", "transactionUri" ], "type": "object" }, "quantity": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "revision": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "seq": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "typeId": { "format": "uuid", "nullable": true, "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "typeKey": { "nullable": true, "type": "string" }, "updatedAt": { "type": "string" } }, "required": [ "id", "revision", "seq", "name", "typeId", "catalogueRevision", "typeKey", "legacyType", "fieldValues", "computedValues", "fields", "note", "code", "externalIds", "quantity", "lifecycle", "lifecycleChangedAt", "placement", "previousPlacement", "isContainer", "access", "isFull", "photos", "provenance", "documentsStatus", "documentTitles", "createdAt", "updatedAt", "deletedAt" ], "type": "object" }, "type": "array" }, "locations": { "items": { "additionalProperties": false, "properties": { "deletedAt": { "nullable": true, "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "parentId": { "nullable": true, "type": "string" }, "revision": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "seq": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "sortOrder": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": [ "id", "revision", "seq", "name", "parentId", "sortOrder", "deletedAt" ], "type": "object" }, "type": "array" }, "minimumProtocol": { "default": 1, "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "nextCursor": { "nullable": true, "type": "string" }, "total": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": [ "epoch", "highWaterSeq", "minimumProtocol", "catalogueVersion", "catalogueRevision", "total", "items", "locations", "nextCursor" ], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "409": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["resync_required"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message"], "type": "object" } } }, "description": "409" }, "426": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["client_too_old"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message"], "type": "object" } } }, "description": "426" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "One page of live items and locations; the first page fixes the high-water seq the feed resumes from", "tags": ["mobileInventory"] } }, "/mobile/inventory/type-catalogue": { "get": { "operationId": "mobileInventory.catalogueRevision", "parameters": [ { "in": "query", "name": "revision", "required": true, "schema": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "revision": { "additionalProperties": false, "properties": { "abandoned": { "additionalProperties": false, "nullable": true, "properties": { "actor": { "additionalProperties": false, "properties": { "id": { "nullable": true, "type": "string" }, "kind": { "type": "string" }, "label": { "type": "string" } }, "required": ["kind", "id", "label"], "type": "object" }, "at": { "type": "string" } }, "required": ["actor", "at"], "type": "object" }, "baseRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "created": { "additionalProperties": false, "properties": { "actor": { "additionalProperties": false, "properties": { "id": { "nullable": true, "type": "string" }, "kind": { "type": "string" }, "label": { "type": "string" } }, "required": ["kind", "id", "label"], "type": "object" }, "at": { "type": "string" } }, "required": ["actor", "at"], "type": "object" }, "minimumProtocol": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "published": { "additionalProperties": false, "nullable": true, "properties": { "actor": { "additionalProperties": false, "properties": { "id": { "nullable": true, "type": "string" }, "kind": { "type": "string" }, "label": { "type": "string" } }, "required": ["kind", "id", "label"], "type": "object" }, "at": { "type": "string" }, "note": { "nullable": true, "type": "string" } }, "required": ["actor", "at", "note"], "type": "object" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "status": { "enum": ["draft", "published", "abandoned"], "type": "string" } }, "required": [ "revision", "baseRevision", "status", "minimumProtocol", "created", "published", "abandoned" ], "type": "object" }, "types": { "items": { "additionalProperties": false, "properties": { "archivedAt": { "nullable": true, "type": "string" }, "capabilities": { "items": { "type": "string" }, "type": "array" }, "description": { "nullable": true, "type": "string" }, "fields": { "items": { "additionalProperties": false, "properties": { "allowOverride": { "type": "boolean" }, "archivedAt": { "nullable": true, "type": "string" }, "cardinality": { "enum": ["one", "many"], "type": "string" }, "defaultValues": { "items": {}, "type": "array" }, "enumOptions": { "items": { "additionalProperties": false, "properties": { "archivedAt": { "nullable": true, "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "key": { "type": "string" }, "label": { "type": "string" }, "sortOrder": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["id", "key", "label", "sortOrder", "archivedAt"], "type": "object" }, "type": "array" }, "expression": { "nullable": true }, "expressionVersion": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "fixedUnit": { "nullable": true, "type": "string" }, "help": { "nullable": true, "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "key": { "type": "string" }, "kind": { "enum": [ "short_text", "long_text", "integer", "decimal", "boolean", "enum", "measurement", "date", "date_time", "url", "reference" ], "type": "string" }, "label": { "type": "string" }, "presentation": { "additionalProperties": {}, "type": "object" }, "referenceKinds": { "items": { "enum": ["item", "location"], "type": "string" }, "type": "array" }, "referenceTypeIds": { "items": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "type": "array" }, "replacedBy": { "format": "uuid", "nullable": true, "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "required": { "type": "boolean" }, "sortOrder": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "storage": { "enum": ["stored", "computed"], "type": "string" }, "typeId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } }, "required": [ "id", "typeId", "key", "label", "help", "sortOrder", "kind", "cardinality", "required", "storage", "fixedUnit", "referenceKinds", "referenceTypeIds", "expressionVersion", "expression", "allowOverride", "presentation", "archivedAt", "enumOptions" ], "type": "object" }, "type": "array" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "key": { "type": "string" }, "label": { "type": "string" }, "legacyLabels": { "items": { "type": "string" }, "type": "array" }, "parentTypeId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "presentation": { "additionalProperties": {}, "type": "object" }, "replacedBy": { "format": "uuid", "nullable": true, "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "sortOrder": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": [ "revision", "id", "key", "label", "description", "sortOrder", "capabilities", "legacyLabels", "presentation", "archivedAt", "fields" ], "type": "object" }, "type": "array" } }, "required": ["revision", "types"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "One exact immutable catalogue revision required by protocol-2 item rows", "tags": ["mobileInventory"] } }, "/mobile/inventory/types": { "get": { "operationId": "mobileInventory.catalogue", "parameters": [], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "types": { "items": { "additionalProperties": false, "properties": { "capabilities": { "items": { "type": "string" }, "type": "array" }, "fields": { "items": { "additionalProperties": false, "properties": { "choices": { "items": { "type": "string" }, "type": "array" }, "dimension": { "type": "string" }, "highlighted": { "type": "boolean" }, "hint": { "type": "string" }, "key": { "type": "string" }, "kind": { "type": "string" }, "label": { "type": "string" }, "required": { "type": "boolean" }, "unit": { "type": "string" } }, "required": ["key", "label", "kind"], "type": "object" }, "type": "array" }, "key": { "type": "string" }, "legacyLabels": { "items": { "type": "string" }, "type": "array" }, "name": { "type": "string" } }, "required": ["key", "name", "capabilities", "fields", "legacyLabels"], "type": "object" }, "type": "array" }, "units": { "items": { "additionalProperties": false, "properties": { "dimension": { "type": "string" }, "multiplier": { "type": "number" }, "symbol": { "type": "string" } }, "required": ["symbol", "dimension", "multiplier"], "type": "object" }, "type": "array" }, "version": { "type": "string" } }, "required": ["version", "units", "types"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "426": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["client_too_old"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message"], "type": "object" } } }, "description": "426" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "The type catalogue: every type, field and unit the app needs to render an item", "tags": ["mobileInventory"] } }, "/mobile/purchases": { "get": { "operationId": "mobilePurchases.listPurchases", "parameters": [ { "in": "query", "name": "limit", "schema": { "exclusiveMinimum": true, "maximum": 100, "minimum": 0, "type": "integer" } }, { "in": "query", "name": "cursor", "schema": { "type": "string" } }, { "in": "query", "name": "status", "schema": { "enum": ["unsettled"], "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "data": { "items": { "additionalProperties": false, "properties": { "currency": { "type": "string" }, "id": { "type": "string" }, "itemCount": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "merchant": { "oneOf": [ { "additionalProperties": false, "properties": { "entityId": { "type": "string" }, "name": { "nullable": true, "type": "string" }, "resolution": { "enum": ["entity"], "type": "string" } }, "required": ["resolution", "entityId", "name"], "type": "object" }, { "additionalProperties": false, "properties": { "name": { "type": "string" }, "resolution": { "enum": ["name"], "type": "string" } }, "required": ["resolution", "name"], "type": "object" }, { "additionalProperties": false, "properties": { "resolution": { "enum": ["unattributed"], "type": "string" } }, "required": ["resolution"], "type": "object" } ] }, "merchantName": { "nullable": true, "type": "string" }, "orderedOn": { "type": "string" }, "receiptUri": { "nullable": true, "type": "string" }, "status": { "type": "string" }, "totalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": [ "id", "merchant", "merchantName", "totalCents", "currency", "orderedOn", "itemCount", "status", "receiptUri" ], "type": "object" }, "type": "array" }, "nextCursor": { "nullable": true, "type": "string" }, "total": { "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": ["data", "nextCursor"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "One cursor-paginated page of purchase list rows", "tags": ["mobilePurchases"] } }, "/mobile/purchases/manual": { "post": { "operationId": "mobilePurchases.createManualPurchase", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "capture": { "additionalProperties": false, "nullable": true, "properties": { "capturedAt": { "nullable": true, "type": "string" }, "capturedAtSource": { "enum": ["client", "exif", null], "nullable": true, "type": "string" }, "declaredTimeZone": { "nullable": true, "type": "string" }, "latitude": { "nullable": true, "type": "number" }, "locationSource": { "enum": ["client", "exif", null], "nullable": true, "type": "string" }, "longitude": { "nullable": true, "type": "number" }, "utcOffsetMinutes": { "maximum": 9007199254740991, "minimum": -9007199254740991, "nullable": true, "type": "integer" } }, "required": [ "capturedAt", "capturedAtSource", "utcOffsetMinutes", "declaredTimeZone", "latitude", "longitude", "locationSource" ], "type": "object" }, "currency": { "type": "string" }, "discountCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "discountIncluded": { "nullable": true, "type": "boolean" }, "idempotencyKey": { "maxLength": 200, "minLength": 1, "type": "string" }, "items": { "items": { "additionalProperties": false, "properties": { "lineTotalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "listPriceAsserted": { "type": "boolean" }, "listPriceCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "nullable": true, "type": "integer" }, "name": { "minLength": 1, "type": "string" }, "notes": { "items": { "type": "string" }, "type": "array" }, "quantity": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "unitPriceCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": ["name", "unitPriceCents", "lineTotalCents", "notes"], "type": "object" }, "minItems": 1, "type": "array" }, "merchantAddressId": { "nullable": true, "type": "string" }, "merchantAddressName": { "nullable": true, "type": "string" }, "merchantEntityId": { "nullable": true, "type": "string" }, "merchantName": { "nullable": true, "type": "string" }, "orderedAt": { "type": "string" }, "orderedAtOffsetMinutes": { "maximum": 9007199254740991, "minimum": -9007199254740991, "nullable": true, "type": "integer" }, "shippingCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "shippingIncluded": { "nullable": true, "type": "boolean" }, "surchargeCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "surchargeIncluded": { "nullable": true, "type": "boolean" }, "taxCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "taxIncluded": { "nullable": true, "type": "boolean" }, "totalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": [ "merchantName", "orderedAt", "currency", "totalCents", "items", "idempotencyKey" ], "type": "object" } } }, "description": "Body" }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "accounting": { "additionalProperties": false, "properties": { "awaitingImportCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "matchedCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "netSpendCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "refundedCents": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "residualCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "totalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": [ "totalCents", "matchedCents", "awaitingImportCents", "residualCents", "refundedCents", "netSpendCents" ], "type": "object" }, "charges": { "items": { "additionalProperties": false, "properties": { "amountCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "chargedOn": { "nullable": true, "type": "string" }, "currency": { "type": "string" }, "id": { "type": "string" }, "matches": { "items": { "additionalProperties": false, "properties": { "amountCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "id": { "type": "string" }, "matchedBy": { "enum": ["automatic", "confirmed"], "type": "string" }, "transaction": { "additionalProperties": false, "nullable": true, "properties": { "accountName": { "nullable": true, "type": "string" }, "amount": { "type": "number" }, "currency": { "type": "string" }, "date": { "type": "string" }, "description": { "type": "string" } }, "required": [ "description", "date", "amount", "currency", "accountName" ], "type": "object" }, "transactionId": { "nullable": true, "type": "string" } }, "required": [ "id", "transactionId", "amountCents", "matchedBy", "transaction" ], "type": "object" }, "type": "array" }, "origin": { "type": "string" }, "role": { "type": "string" } }, "required": [ "id", "amountCents", "currency", "role", "origin", "chargedOn", "matches" ], "type": "object" }, "type": "array" }, "currency": { "type": "string" }, "discountCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "edit": { "additionalProperties": false, "nullable": true, "properties": { "changes": { "items": { "additionalProperties": false, "properties": { "current": { "nullable": true, "type": "string" }, "field": { "type": "string" }, "itemId": { "nullable": true, "type": "string" }, "original": { "nullable": true, "type": "string" } }, "required": ["field", "itemId", "original", "current"], "type": "object" }, "type": "array" }, "editedAt": { "type": "string" } }, "required": ["editedAt", "changes"], "type": "object" }, "id": { "type": "string" }, "itemCount": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "items": { "items": { "additionalProperties": false, "properties": { "hasInventoryLink": { "type": "boolean" }, "id": { "type": "string" }, "lineTotalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "name": { "type": "string" }, "quantity": { "maximum": 9007199254740991, "minimum": 1, "type": "integer" } }, "required": ["id", "name", "quantity", "lineTotalCents"], "type": "object" }, "type": "array" }, "merchant": { "oneOf": [ { "additionalProperties": false, "properties": { "entityId": { "type": "string" }, "name": { "nullable": true, "type": "string" }, "resolution": { "enum": ["entity"], "type": "string" } }, "required": ["resolution", "entityId", "name"], "type": "object" }, { "additionalProperties": false, "properties": { "name": { "type": "string" }, "resolution": { "enum": ["name"], "type": "string" } }, "required": ["resolution", "name"], "type": "object" }, { "additionalProperties": false, "properties": { "resolution": { "enum": ["unattributed"], "type": "string" } }, "required": ["resolution"], "type": "object" } ] }, "merchantName": { "nullable": true, "type": "string" }, "orderedAt": { "type": "string" }, "orderedOn": { "type": "string" }, "receiptUri": { "nullable": true, "type": "string" }, "receiptUris": { "items": { "type": "string" }, "type": "array" }, "shippingCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "source": { "type": "string" }, "status": { "type": "string" }, "subtotalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "surchargeCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "taxCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "totalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "updatedAt": { "nullable": true, "type": "string" } }, "required": [ "id", "merchant", "merchantName", "totalCents", "currency", "orderedOn", "itemCount", "status", "receiptUri", "orderedAt", "updatedAt", "subtotalCents", "taxCents", "shippingCents", "discountCents", "surchargeCents", "source", "items", "edit", "receiptUris" ], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Create a purchase typed by hand, with no receipt", "tags": ["mobilePurchases"] } }, "/mobile/purchases/receipts": { "post": { "operationId": "mobilePurchases.saveReceiptDraft", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "capture": { "additionalProperties": false, "nullable": true, "properties": { "capturedAt": { "nullable": true, "type": "string" }, "capturedAtSource": { "enum": ["client", "exif", null], "nullable": true, "type": "string" }, "declaredTimeZone": { "nullable": true, "type": "string" }, "latitude": { "nullable": true, "type": "number" }, "locationSource": { "enum": ["client", "exif", null], "nullable": true, "type": "string" }, "longitude": { "nullable": true, "type": "number" }, "utcOffsetMinutes": { "maximum": 9007199254740991, "minimum": -9007199254740991, "nullable": true, "type": "integer" } }, "required": [ "capturedAt", "capturedAtSource", "utcOffsetMinutes", "declaredTimeZone", "latitude", "longitude", "locationSource" ], "type": "object" }, "currency": { "type": "string" }, "discountCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "discountIncluded": { "nullable": true, "type": "boolean" }, "documents": { "items": { "additionalProperties": false, "properties": { "documentUri": { "type": "string" }, "kind": { "enum": ["receipt"], "type": "string" } }, "required": ["documentUri", "kind"], "type": "object" }, "minItems": 1, "type": "array" }, "idempotencyKey": { "maxLength": 200, "minLength": 1, "type": "string" }, "items": { "items": { "additionalProperties": false, "properties": { "lineTotalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "listPriceAsserted": { "type": "boolean" }, "listPriceCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "nullable": true, "type": "integer" }, "name": { "minLength": 1, "type": "string" }, "notes": { "items": { "type": "string" }, "type": "array" }, "quantity": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "unitPriceCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": ["name", "unitPriceCents", "lineTotalCents", "notes"], "type": "object" }, "minItems": 1, "type": "array" }, "merchantAddressId": { "nullable": true, "type": "string" }, "merchantAddressName": { "nullable": true, "type": "string" }, "merchantEntityId": { "nullable": true, "type": "string" }, "merchantName": { "nullable": true, "type": "string" }, "orderedAt": { "type": "string" }, "orderedAtOffsetMinutes": { "maximum": 9007199254740991, "minimum": -9007199254740991, "nullable": true, "type": "integer" }, "shippingCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "shippingIncluded": { "nullable": true, "type": "boolean" }, "surchargeCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "surchargeIncluded": { "nullable": true, "type": "boolean" }, "taxCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "taxIncluded": { "nullable": true, "type": "boolean" }, "totalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": [ "merchantName", "orderedAt", "currency", "totalCents", "items", "idempotencyKey", "documents" ], "type": "object" } } }, "description": "Body" }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "accounting": { "additionalProperties": false, "properties": { "awaitingImportCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "matchedCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "netSpendCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "refundedCents": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "residualCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "totalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": [ "totalCents", "matchedCents", "awaitingImportCents", "residualCents", "refundedCents", "netSpendCents" ], "type": "object" }, "charges": { "items": { "additionalProperties": false, "properties": { "amountCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "chargedOn": { "nullable": true, "type": "string" }, "currency": { "type": "string" }, "id": { "type": "string" }, "matches": { "items": { "additionalProperties": false, "properties": { "amountCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "id": { "type": "string" }, "matchedBy": { "enum": ["automatic", "confirmed"], "type": "string" }, "transaction": { "additionalProperties": false, "nullable": true, "properties": { "accountName": { "nullable": true, "type": "string" }, "amount": { "type": "number" }, "currency": { "type": "string" }, "date": { "type": "string" }, "description": { "type": "string" } }, "required": [ "description", "date", "amount", "currency", "accountName" ], "type": "object" }, "transactionId": { "nullable": true, "type": "string" } }, "required": [ "id", "transactionId", "amountCents", "matchedBy", "transaction" ], "type": "object" }, "type": "array" }, "origin": { "type": "string" }, "role": { "type": "string" } }, "required": [ "id", "amountCents", "currency", "role", "origin", "chargedOn", "matches" ], "type": "object" }, "type": "array" }, "currency": { "type": "string" }, "discountCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "edit": { "additionalProperties": false, "nullable": true, "properties": { "changes": { "items": { "additionalProperties": false, "properties": { "current": { "nullable": true, "type": "string" }, "field": { "type": "string" }, "itemId": { "nullable": true, "type": "string" }, "original": { "nullable": true, "type": "string" } }, "required": ["field", "itemId", "original", "current"], "type": "object" }, "type": "array" }, "editedAt": { "type": "string" } }, "required": ["editedAt", "changes"], "type": "object" }, "id": { "type": "string" }, "itemCount": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "items": { "items": { "additionalProperties": false, "properties": { "hasInventoryLink": { "type": "boolean" }, "id": { "type": "string" }, "lineTotalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "name": { "type": "string" }, "quantity": { "maximum": 9007199254740991, "minimum": 1, "type": "integer" } }, "required": ["id", "name", "quantity", "lineTotalCents"], "type": "object" }, "type": "array" }, "merchant": { "oneOf": [ { "additionalProperties": false, "properties": { "entityId": { "type": "string" }, "name": { "nullable": true, "type": "string" }, "resolution": { "enum": ["entity"], "type": "string" } }, "required": ["resolution", "entityId", "name"], "type": "object" }, { "additionalProperties": false, "properties": { "name": { "type": "string" }, "resolution": { "enum": ["name"], "type": "string" } }, "required": ["resolution", "name"], "type": "object" }, { "additionalProperties": false, "properties": { "resolution": { "enum": ["unattributed"], "type": "string" } }, "required": ["resolution"], "type": "object" } ] }, "merchantName": { "nullable": true, "type": "string" }, "orderedAt": { "type": "string" }, "orderedOn": { "type": "string" }, "receiptUri": { "nullable": true, "type": "string" }, "receiptUris": { "items": { "type": "string" }, "type": "array" }, "shippingCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "source": { "type": "string" }, "status": { "type": "string" }, "subtotalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "surchargeCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "taxCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "totalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "updatedAt": { "nullable": true, "type": "string" } }, "required": [ "id", "merchant", "merchantName", "totalCents", "currency", "orderedOn", "itemCount", "status", "receiptUri", "orderedAt", "updatedAt", "subtotalCents", "taxCents", "shippingCents", "discountCents", "surchargeCents", "source", "items", "edit", "receiptUris" ], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Save a reviewed, possibly corrected receipt-derived draft as a purchase", "tags": ["mobilePurchases"] } }, "/mobile/purchases/receipts/extract": { "post": { "operationId": "mobilePurchases.extractReceipt", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "capture": { "additionalProperties": false, "properties": { "capturedAt": { "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", "type": "string" }, "location": { "additionalProperties": false, "properties": { "latitude": { "maximum": 90, "minimum": -90, "type": "number" }, "longitude": { "maximum": 180, "minimum": -180, "type": "number" } }, "required": ["latitude", "longitude"], "type": "object" }, "timeZone": { "maxLength": 64, "minLength": 1, "type": "string" } }, "type": "object" }, "parts": { "items": { "additionalProperties": false, "properties": { "dataBase64": { "minLength": 1, "type": "string" }, "mediaType": { "enum": [ "image/jpeg", "image/png", "image/webp", "image/gif", "application/pdf", "text/plain" ], "type": "string" } }, "required": ["mediaType", "dataBase64"], "type": "object" }, "minItems": 1, "type": "array" } }, "required": ["parts"], "type": "object" } } }, "description": "Body" }, "responses": { "200": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "draft": { "additionalProperties": false, "properties": { "capture": { "additionalProperties": false, "nullable": true, "properties": { "capturedAt": { "nullable": true, "type": "string" }, "capturedAtSource": { "enum": ["client", "exif", null], "nullable": true, "type": "string" }, "declaredTimeZone": { "nullable": true, "type": "string" }, "latitude": { "nullable": true, "type": "number" }, "locationSource": { "enum": ["client", "exif", null], "nullable": true, "type": "string" }, "longitude": { "nullable": true, "type": "number" }, "utcOffsetMinutes": { "maximum": 9007199254740991, "minimum": -9007199254740991, "nullable": true, "type": "integer" } }, "required": [ "capturedAt", "capturedAtSource", "utcOffsetMinutes", "declaredTimeZone", "latitude", "longitude", "locationSource" ], "type": "object" }, "currency": { "type": "string" }, "discountCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "discountIncluded": { "nullable": true, "type": "boolean" }, "documents": { "items": { "additionalProperties": false, "properties": { "documentUri": { "type": "string" }, "kind": { "enum": ["receipt"], "type": "string" } }, "required": ["documentUri", "kind"], "type": "object" }, "type": "array" }, "items": { "items": { "additionalProperties": false, "properties": { "lineTotalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "listPriceAsserted": { "type": "boolean" }, "listPriceCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "nullable": true, "type": "integer" }, "name": { "minLength": 1, "type": "string" }, "notes": { "items": { "type": "string" }, "type": "array" }, "quantity": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "unitPriceCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": ["name", "unitPriceCents", "lineTotalCents", "notes"], "type": "object" }, "type": "array" }, "merchantAddressName": { "nullable": true, "type": "string" }, "merchantName": { "nullable": true, "type": "string" }, "orderedAt": { "type": "string" }, "orderedAtOffsetMinutes": { "maximum": 9007199254740991, "minimum": -9007199254740991, "nullable": true, "type": "integer" }, "shippingCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "shippingIncluded": { "nullable": true, "type": "boolean" }, "subtotalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "surchargeCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "surchargeIncluded": { "nullable": true, "type": "boolean" }, "taxCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "taxIncluded": { "nullable": true, "type": "boolean" }, "totalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": [ "merchantName", "merchantAddressName", "orderedAt", "orderedAtOffsetMinutes", "currency", "totalCents", "subtotalCents", "taxCents", "surchargeCents", "shippingCents", "discountCents", "taxIncluded", "discountIncluded", "surchargeIncluded", "shippingIncluded", "items", "documents", "capture" ], "type": "object" }, "failures": { "items": { "additionalProperties": false, "properties": { "code": { "type": "string" }, "deltaCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "nullable": true, "type": "integer" }, "detail": { "type": "string" } }, "required": ["code", "detail", "deltaCents"], "type": "object" }, "type": "array" }, "kind": { "enum": ["draft"], "type": "string" }, "matchedMerchantEntityId": { "nullable": true, "type": "string" }, "receiptUris": { "items": { "type": "string" }, "minItems": 1, "type": "array" }, "reconciled": { "type": "boolean" } }, "required": [ "kind", "receiptUris", "reconciled", "failures", "draft", "matchedMerchantEntityId" ], "type": "object" }, { "additionalProperties": false, "properties": { "kind": { "enum": ["unreadable"], "type": "string" }, "reason": { "type": "string" }, "receiptUris": { "items": { "type": "string" }, "minItems": 1, "type": "array" } }, "required": ["kind", "receiptUris", "reason"], "type": "object" } ] } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "413": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["payload_too_large"], "type": "string" }, "maxBytes": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "message": { "type": "string" } }, "required": ["code", "maxBytes", "message"], "type": "object" } } }, "description": "413" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Read a photographed, scanned or pasted receipt into an editable draft", "tags": ["mobilePurchases"] } }, "/mobile/purchases/receipts/{sha256}": { "get": { "operationId": "mobilePurchases.getReceipt", "parameters": [ { "in": "path", "name": "sha256", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "byteLength": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "dataBase64": { "type": "string" }, "mediaType": { "type": "string" }, "sha256": { "type": "string" } }, "required": ["sha256", "mediaType", "byteLength", "dataBase64"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "The receipt itself, full size, for a detail screen", "tags": ["mobilePurchases"] } }, "/mobile/purchases/receipts/{sha256}/thumbnail": { "get": { "operationId": "mobilePurchases.getReceiptThumbnail", "parameters": [ { "in": "path", "name": "sha256", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "byteLength": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "dataBase64": { "type": "string" }, "mediaType": { "type": "string" }, "sha256": { "type": "string" } }, "required": ["sha256", "mediaType", "byteLength", "dataBase64"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "415": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "415" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "The list-sized image behind a row’s receiptUri", "tags": ["mobilePurchases"] } }, "/mobile/purchases/search": { "get": { "operationId": "mobilePurchases.searchPurchases", "parameters": [ { "in": "query", "name": "q", "required": true, "schema": { "minLength": 1, "type": "string" } }, { "in": "query", "name": "kind", "schema": { "enum": ["any", "purchases", "lines"], "type": "string" } }, { "in": "query", "name": "cursor", "schema": { "type": "string" } }, { "in": "query", "name": "limit", "required": true, "schema": { "default": 25, "maximum": 100, "minimum": 1, "type": "integer" } }, { "in": "query", "name": "status", "schema": { "enum": [ "awaiting_settlement", "linked", "partial", "settled_cash", "ignored", "nothing_to_settle" ], "type": "string" } }, { "in": "query", "name": "tags", "schema": { "items": { "minLength": 1, "type": "string" }, "type": "array" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "hits": { "items": { "oneOf": [ { "additionalProperties": false, "properties": { "currency": { "type": "string" }, "id": { "type": "string" }, "kind": { "enum": ["purchase"], "type": "string" }, "matchField": { "type": "string" }, "matchedText": { "nullable": true, "type": "string" }, "merchantName": { "nullable": true, "type": "string" }, "orderedOn": { "type": "string" }, "status": { "type": "string" }, "totalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": [ "kind", "id", "merchantName", "totalCents", "currency", "orderedOn", "status", "matchField", "matchedText" ], "type": "object" }, { "additionalProperties": false, "properties": { "currency": { "type": "string" }, "id": { "type": "string" }, "kind": { "enum": ["item"], "type": "string" }, "lineTotalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "matchField": { "type": "string" }, "matchedText": { "nullable": true, "type": "string" }, "merchantName": { "nullable": true, "type": "string" }, "name": { "type": "string" }, "orderedOn": { "type": "string" }, "purchaseId": { "type": "string" }, "quantity": { "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "status": { "type": "string" }, "totalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": [ "kind", "id", "purchaseId", "name", "quantity", "lineTotalCents", "totalCents", "currency", "merchantName", "orderedOn", "status", "matchField", "matchedText" ], "type": "object" } ] }, "type": "array" }, "nextCursor": { "nullable": true, "type": "string" }, "totalCount": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["hits", "nextCursor"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Search purchases and their line items by merchant, product name or item tag", "tags": ["mobilePurchases"] } }, "/mobile/purchases/summary": { "get": { "operationId": "mobilePurchases.getMonthSummary", "parameters": [ { "in": "query", "name": "month", "required": true, "schema": { "pattern": "^\\d{4}-(0[1-9]|1[0-2])$", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "merchantLeaders": { "items": { "additionalProperties": false, "properties": { "currency": { "type": "string" }, "merchantName": { "nullable": true, "type": "string" }, "netSpendCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "orderCount": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["merchantName", "currency", "netSpendCents", "orderCount"], "type": "object" }, "type": "array" }, "month": { "type": "string" }, "previousMonthTotals": { "items": { "additionalProperties": false, "properties": { "currency": { "type": "string" }, "netSpendCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "orderCount": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "totalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": ["currency", "orderCount", "totalCents", "netSpendCents"], "type": "object" }, "nullable": true, "type": "array" }, "purchaseCount": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "totals": { "items": { "additionalProperties": false, "properties": { "currency": { "type": "string" }, "netSpendCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "orderCount": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "totalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": ["currency", "orderCount", "totalCents", "netSpendCents"], "type": "object" }, "type": "array" }, "unmatchedCount": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": [ "month", "totals", "purchaseCount", "previousMonthTotals", "unmatchedCount", "merchantLeaders" ], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "The home screen figures for one calendar month", "tags": ["mobilePurchases"] } }, "/mobile/purchases/tags": { "get": { "operationId": "mobilePurchases.purchaseTags", "parameters": [ { "in": "query", "name": "search", "schema": { "maxLength": 200, "type": "string" } }, { "in": "query", "name": "cursor", "schema": { "type": "string" } }, { "in": "query", "name": "limit", "required": true, "schema": { "default": 25, "maximum": 100, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "nextCursor": { "nullable": true, "type": "string" }, "tags": { "items": { "additionalProperties": false, "properties": { "count": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "tag": { "type": "string" } }, "required": ["tag", "count"], "type": "object" }, "type": "array" }, "totalCount": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["tags", "nextCursor"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "The item tag vocabulary in use, most-used first, for the search filter sheet", "tags": ["mobilePurchases"] } }, "/mobile/purchases/{id}": { "get": { "operationId": "mobilePurchases.getPurchase", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "accounting": { "additionalProperties": false, "properties": { "awaitingImportCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "matchedCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "netSpendCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "refundedCents": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "residualCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "totalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": [ "totalCents", "matchedCents", "awaitingImportCents", "residualCents", "refundedCents", "netSpendCents" ], "type": "object" }, "charges": { "items": { "additionalProperties": false, "properties": { "amountCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "chargedOn": { "nullable": true, "type": "string" }, "currency": { "type": "string" }, "id": { "type": "string" }, "matches": { "items": { "additionalProperties": false, "properties": { "amountCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "id": { "type": "string" }, "matchedBy": { "enum": ["automatic", "confirmed"], "type": "string" }, "transaction": { "additionalProperties": false, "nullable": true, "properties": { "accountName": { "nullable": true, "type": "string" }, "amount": { "type": "number" }, "currency": { "type": "string" }, "date": { "type": "string" }, "description": { "type": "string" } }, "required": [ "description", "date", "amount", "currency", "accountName" ], "type": "object" }, "transactionId": { "nullable": true, "type": "string" } }, "required": [ "id", "transactionId", "amountCents", "matchedBy", "transaction" ], "type": "object" }, "type": "array" }, "origin": { "type": "string" }, "role": { "type": "string" } }, "required": [ "id", "amountCents", "currency", "role", "origin", "chargedOn", "matches" ], "type": "object" }, "type": "array" }, "currency": { "type": "string" }, "discountCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "edit": { "additionalProperties": false, "nullable": true, "properties": { "changes": { "items": { "additionalProperties": false, "properties": { "current": { "nullable": true, "type": "string" }, "field": { "type": "string" }, "itemId": { "nullable": true, "type": "string" }, "original": { "nullable": true, "type": "string" } }, "required": ["field", "itemId", "original", "current"], "type": "object" }, "type": "array" }, "editedAt": { "type": "string" } }, "required": ["editedAt", "changes"], "type": "object" }, "id": { "type": "string" }, "itemCount": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "items": { "items": { "additionalProperties": false, "properties": { "hasInventoryLink": { "type": "boolean" }, "id": { "type": "string" }, "lineTotalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "name": { "type": "string" }, "quantity": { "maximum": 9007199254740991, "minimum": 1, "type": "integer" } }, "required": ["id", "name", "quantity", "lineTotalCents"], "type": "object" }, "type": "array" }, "merchant": { "oneOf": [ { "additionalProperties": false, "properties": { "entityId": { "type": "string" }, "name": { "nullable": true, "type": "string" }, "resolution": { "enum": ["entity"], "type": "string" } }, "required": ["resolution", "entityId", "name"], "type": "object" }, { "additionalProperties": false, "properties": { "name": { "type": "string" }, "resolution": { "enum": ["name"], "type": "string" } }, "required": ["resolution", "name"], "type": "object" }, { "additionalProperties": false, "properties": { "resolution": { "enum": ["unattributed"], "type": "string" } }, "required": ["resolution"], "type": "object" } ] }, "merchantName": { "nullable": true, "type": "string" }, "orderedAt": { "type": "string" }, "orderedOn": { "type": "string" }, "receiptUri": { "nullable": true, "type": "string" }, "receiptUris": { "items": { "type": "string" }, "type": "array" }, "shippingCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "source": { "type": "string" }, "status": { "type": "string" }, "subtotalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "surchargeCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "taxCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "totalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "updatedAt": { "nullable": true, "type": "string" } }, "required": [ "id", "merchant", "merchantName", "totalCents", "currency", "orderedOn", "itemCount", "status", "receiptUri", "orderedAt", "updatedAt", "subtotalCents", "taxCents", "shippingCents", "discountCents", "surchargeCents", "source", "items", "edit", "receiptUris" ], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "The fuller record behind one list row, with its lines", "tags": ["mobilePurchases"] }, "patch": { "operationId": "mobilePurchases.updatePurchase", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "discountCents": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "expectedUpdatedAt": { "type": "string" }, "lines": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "lineTotalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "name": { "minLength": 1, "type": "string" }, "quantity": { "maximum": 9007199254740991, "minimum": 1, "type": "integer" } }, "required": ["name", "quantity", "lineTotalCents"], "type": "object" }, "type": "array" }, "merchantEntityId": { "nullable": true, "type": "string" }, "merchantEntityName": { "nullable": true, "type": "string" }, "orderedAt": { "type": "string" }, "shippingCents": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "subtotalCents": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "surchargeCents": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "taxCents": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "totalCents": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["lines", "expectedUpdatedAt"], "type": "object" } } }, "description": "Body" }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "accounting": { "additionalProperties": false, "properties": { "awaitingImportCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "matchedCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "netSpendCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "refundedCents": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "residualCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "totalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": [ "totalCents", "matchedCents", "awaitingImportCents", "residualCents", "refundedCents", "netSpendCents" ], "type": "object" }, "charges": { "items": { "additionalProperties": false, "properties": { "amountCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "chargedOn": { "nullable": true, "type": "string" }, "currency": { "type": "string" }, "id": { "type": "string" }, "matches": { "items": { "additionalProperties": false, "properties": { "amountCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "id": { "type": "string" }, "matchedBy": { "enum": ["automatic", "confirmed"], "type": "string" }, "transaction": { "additionalProperties": false, "nullable": true, "properties": { "accountName": { "nullable": true, "type": "string" }, "amount": { "type": "number" }, "currency": { "type": "string" }, "date": { "type": "string" }, "description": { "type": "string" } }, "required": [ "description", "date", "amount", "currency", "accountName" ], "type": "object" }, "transactionId": { "nullable": true, "type": "string" } }, "required": [ "id", "transactionId", "amountCents", "matchedBy", "transaction" ], "type": "object" }, "type": "array" }, "origin": { "type": "string" }, "role": { "type": "string" } }, "required": [ "id", "amountCents", "currency", "role", "origin", "chargedOn", "matches" ], "type": "object" }, "type": "array" }, "currency": { "type": "string" }, "discountCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "edit": { "additionalProperties": false, "nullable": true, "properties": { "changes": { "items": { "additionalProperties": false, "properties": { "current": { "nullable": true, "type": "string" }, "field": { "type": "string" }, "itemId": { "nullable": true, "type": "string" }, "original": { "nullable": true, "type": "string" } }, "required": ["field", "itemId", "original", "current"], "type": "object" }, "type": "array" }, "editedAt": { "type": "string" } }, "required": ["editedAt", "changes"], "type": "object" }, "id": { "type": "string" }, "itemCount": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "items": { "items": { "additionalProperties": false, "properties": { "hasInventoryLink": { "type": "boolean" }, "id": { "type": "string" }, "lineTotalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "name": { "type": "string" }, "quantity": { "maximum": 9007199254740991, "minimum": 1, "type": "integer" } }, "required": ["id", "name", "quantity", "lineTotalCents"], "type": "object" }, "type": "array" }, "merchant": { "oneOf": [ { "additionalProperties": false, "properties": { "entityId": { "type": "string" }, "name": { "nullable": true, "type": "string" }, "resolution": { "enum": ["entity"], "type": "string" } }, "required": ["resolution", "entityId", "name"], "type": "object" }, { "additionalProperties": false, "properties": { "name": { "type": "string" }, "resolution": { "enum": ["name"], "type": "string" } }, "required": ["resolution", "name"], "type": "object" }, { "additionalProperties": false, "properties": { "resolution": { "enum": ["unattributed"], "type": "string" } }, "required": ["resolution"], "type": "object" } ] }, "merchantName": { "nullable": true, "type": "string" }, "orderedAt": { "type": "string" }, "orderedOn": { "type": "string" }, "receiptUri": { "nullable": true, "type": "string" }, "receiptUris": { "items": { "type": "string" }, "type": "array" }, "shippingCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "source": { "type": "string" }, "status": { "type": "string" }, "subtotalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "surchargeCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "taxCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "totalCents": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "updatedAt": { "nullable": true, "type": "string" } }, "required": [ "id", "merchant", "merchantName", "totalCents", "currency", "orderedOn", "itemCount", "status", "receiptUri", "orderedAt", "updatedAt", "subtotalCents", "taxCents", "shippingCents", "discountCents", "surchargeCents", "source", "items", "edit", "receiptUris" ], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "409": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "409" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Edit a saved purchase", "tags": ["mobilePurchases"] } }, "/mobile/trips": { "get": { "operationId": "mobileTrips.listTrips", "parameters": [ { "in": "query", "name": "limit", "required": true, "schema": { "default": 25, "exclusiveMinimum": true, "maximum": 100, "minimum": 0, "type": "integer" } }, { "in": "query", "name": "cursor", "schema": { "minLength": 1, "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "destination": { "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "parentId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "tagId": { "format": "uuid", "nullable": true, "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "when": { "type": "string" } }, "required": [ "id", "name", "destination", "when", "tagId", "parentId", "notes", "sourceLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "nextCursor": { "nullable": true, "type": "string" }, "totalCount": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["items", "nextCursor", "totalCount"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Read a snapshot-bound page of original trip metadata", "tags": ["mobileTrips"] }, "post": { "operationId": "mobileTrips.createTrip", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "destination": { "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "parentId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "tagId": { "format": "uuid", "nullable": true, "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "when": { "type": "string" } }, "type": "object" } } }, "description": "Body" }, "responses": { "201": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "destination": { "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "parentId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "tagId": { "format": "uuid", "nullable": true, "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "when": { "type": "string" } }, "required": [ "id", "name", "destination", "when", "tagId", "parentId", "notes", "sourceLinks", "createdAt", "updatedAt" ], "type": "object" } } }, "description": "201" }, "400": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } ] } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "409": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "409" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Create a permanent canonical Trip without inferred dates or creation Undo", "tags": ["mobileTrips"] } }, "/mobile/trips/{id}": { "get": { "operationId": "mobileTrips.getTrip", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "documentAssociations": { "items": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "documentId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "targetId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "targetKind": { "enum": ["trip", "visit", "journey", "stay", "event"], "type": "string" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": [ "id", "tripId", "documentId", "targetKind", "targetId", "createdAt" ], "type": "object" }, "type": "array" }, "events": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "arrangement": { "enum": ["Booked", "Agreed", "Not arranged", "Not needed", null], "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "documentLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "intention": { "enum": ["In plan", "Considering", "Alternative", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "organiserLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "purchase": { "enum": ["Purchased", null], "nullable": true, "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "sourceUrl": { "format": "uri", "nullable": true, "type": "string" }, "ticketUrl": { "format": "uri", "nullable": true, "type": "string" }, "timing": { "additionalProperties": false, "properties": { "end": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "endTime": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "start": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "startTime": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "timeZone": { "type": "string" } }, "type": "object" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "venueLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "visitId", "name", "intention", "arrangement", "purchase", "timing", "address", "reference", "sourceUrl", "ticketUrl", "notes", "sourceLinks", "venueLinks", "organiserLinks", "documentLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "journeyGroups": { "items": { "additionalProperties": false, "properties": { "alternativeJourneyIds": { "items": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "type": "array" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "currentJourneyId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "revision": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "currentJourneyId", "alternativeJourneyIds", "revision", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "journeys": { "items": { "additionalProperties": false, "properties": { "buffers": { "additionalProperties": false, "properties": { "airportBufferMinutes": { "minimum": 0, "type": "number" }, "minimumConnectionMinutes": { "minimum": 0, "type": "number" } }, "type": "object" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "legs": { "items": { "additionalProperties": false, "properties": { "arrangement": { "enum": ["Booked", "Agreed", "Not arranged", "Not needed", null], "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "from": { "additionalProperties": false, "properties": { "local": { "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d+)?)?$", "type": "string" }, "placeId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "sourceLabel": { "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "timeZone": { "type": "string" } }, "type": "object" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "intention": { "enum": ["In plan", "Considering", "Alternative", null], "nullable": true, "type": "string" }, "journeyId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "mode": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "operator": { "nullable": true, "type": "string" }, "purchase": { "enum": ["Purchased", null], "nullable": true, "type": "string" }, "reference": { "nullable": true, "type": "string" }, "service": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "to": { "additionalProperties": false, "properties": { "local": { "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d+)?)?$", "type": "string" }, "placeId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "sourceLabel": { "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "timeZone": { "type": "string" } }, "type": "object" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "journeyId", "mode", "from", "to", "intention", "arrangement", "purchase", "operator", "service", "reference", "notes", "sourceLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "name", "reference", "notes", "sourceLinks", "buffers", "createdAt", "updatedAt", "legs" ], "type": "object" }, "type": "array" }, "places": { "items": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "name": { "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": ["id", "name", "sourceLinks", "createdAt", "updatedAt"], "type": "object" }, "type": "array" }, "stays": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "documentLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "hostLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["hotel", "friend", "family", "other", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "status": { "enum": ["Considering", "Agreed", "Reserved", "Purchased", null], "nullable": true, "type": "string" }, "timing": { "additionalProperties": false, "properties": { "arrival": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "checkIn": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "checkOut": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "departure": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "timeZone": { "type": "string" } }, "type": "object" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "visitId", "name", "kind", "status", "timing", "address", "reference", "notes", "sourceLinks", "hostLinks", "documentLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "trip": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "destination": { "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "parentId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "tagId": { "format": "uuid", "nullable": true, "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "when": { "type": "string" } }, "required": [ "id", "name", "destination", "when", "tagId", "parentId", "notes", "sourceLinks", "createdAt", "updatedAt" ], "type": "object" }, "visits": { "items": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "notes": { "type": "string" }, "placeId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "timing": { "additionalProperties": false, "properties": { "arrival": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "departure": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "duration": { "additionalProperties": false, "properties": { "max": { "minimum": 0, "type": "number" }, "min": { "minimum": 0, "type": "number" }, "unit": { "enum": ["days", "weeks"], "type": "string" } }, "required": ["unit"], "type": "object" }, "month": { "additionalProperties": false, "properties": { "month": { "maximum": 12, "minimum": 1, "type": "integer" }, "part": { "enum": ["early", "middle", "late"], "type": "string" }, "year": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": ["year", "month"], "type": "object" } }, "type": "object" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "placeId", "timing", "notes", "sourceLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" } }, "required": [ "trip", "places", "visits", "journeys", "journeyGroups", "stays", "events", "documentAssociations" ], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Read one trip with complete ordered visits, journeys, groups, stays, events and document associations", "tags": ["mobileTrips"] }, "patch": { "operationId": "mobileTrips.updateTrip", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MobileTripPatchInput" } } }, "description": "Body" }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "destination": { "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "parentId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "tagId": { "format": "uuid", "nullable": true, "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "when": { "type": "string" } }, "required": [ "id", "name", "destination", "when", "tagId", "parentId", "notes", "sourceLinks", "createdAt", "updatedAt" ], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } ] } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "409": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "409" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Patch explicit Trip metadata; omission retains and null clears nullable source facts", "tags": ["mobileTrips"] } }, "/mobile/trips/{tripId}/capture-workspace": { "get": { "operationId": "mobileTripCaptures.workspace", "parameters": [ { "in": "path", "name": "tripId", "required": true, "schema": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "associations": { "items": { "additionalProperties": false, "properties": { "captureId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "provenance": { "enum": ["existing", "created"], "type": "string" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "sourceRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "target": { "oneOf": [ { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["idea"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["event"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["journey"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["stay"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "kind": { "enum": ["contact"], "type": "string" }, "reference": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" } }, "required": ["kind", "reference"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "captureId", "target", "provenance", "sourceRevision", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "captures": { "items": { "additionalProperties": false, "properties": { "attachments": { "items": { "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["task"], "type": "string" }, "taskId": { "pattern": "^[A-Za-z0-9_-]{1,72}$", "type": "string" } }, "required": ["kind", "taskId"], "type": "object" }, { "additionalProperties": false, "properties": { "documentId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["document"], "type": "string" }, "taskId": { "pattern": "^[A-Za-z0-9_-]{1,72}$", "type": "string" } }, "required": ["kind", "documentId"], "type": "object" } ] }, "type": "array" }, "classification": { "enum": ["idea", "note", "event", "link", "document", null], "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "notes": { "type": "string" }, "originalText": { "type": "string" }, "originalUrl": { "nullable": true, "type": "string" }, "placeId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "title": { "nullable": true, "type": "string" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "originalText", "originalUrl", "attachments", "title", "notes", "classification", "placeId", "visitId", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "events": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "arrangement": { "enum": ["Booked", "Agreed", "Not arranged", "Not needed", null], "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "documentLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "intention": { "enum": ["In plan", "Considering", "Alternative", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "organiserLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "purchase": { "enum": ["Purchased", null], "nullable": true, "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "sourceUrl": { "format": "uri", "nullable": true, "type": "string" }, "ticketUrl": { "format": "uri", "nullable": true, "type": "string" }, "timing": { "additionalProperties": false, "properties": { "end": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "endTime": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "start": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "startTime": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "timeZone": { "type": "string" } }, "type": "object" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "venueLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "visitId", "name", "intention", "arrangement", "purchase", "timing", "address", "reference", "sourceUrl", "ticketUrl", "notes", "sourceLinks", "venueLinks", "organiserLinks", "documentLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "ideas": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "contactLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" }, "type": "array" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["destination", "place", "activity", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "placeId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "purpose": { "enum": ["visit", "meet-people", "see-someone", "other", null], "nullable": true, "type": "string" }, "reason": { "type": "string" }, "recommendations": { "items": { "additionalProperties": false, "properties": { "contact": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" }, "note": { "type": "string" } }, "required": ["contact", "note"], "type": "object" }, "type": "array" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "status": { "enum": ["Saved", "Considering", "In plan", null], "nullable": true, "type": "string" }, "timing": { "oneOf": [ { "additionalProperties": false, "properties": { "mode": { "enum": ["none"], "type": "string" } }, "required": ["mode"], "type": "object" }, { "additionalProperties": false, "properties": { "mode": { "enum": ["month"], "type": "string" }, "month": { "pattern": "^\\d{4}-(0[1-9]|1[0-2])$", "type": "string" } }, "required": ["mode"], "type": "object" }, { "additionalProperties": false, "properties": { "from": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "mode": { "enum": ["dates"], "type": "string" }, "to": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" } }, "required": ["mode"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "name", "kind", "purpose", "status", "reason", "notes", "address", "placeId", "visitId", "timing", "sourceLinks", "contactLinks", "recommendations", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "journeys": { "items": { "additionalProperties": false, "properties": { "buffers": { "additionalProperties": false, "properties": { "airportBufferMinutes": { "minimum": 0, "type": "number" }, "minimumConnectionMinutes": { "minimum": 0, "type": "number" } }, "type": "object" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "name", "reference", "notes", "sourceLinks", "buffers", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "memberships": { "items": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "source": { "oneOf": [ { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["capture"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["idea"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["event"], "type": "string" } }, "required": ["kind", "id"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "source", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "stays": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "documentLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "hostLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["hotel", "friend", "family", "other", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "status": { "enum": ["Considering", "Agreed", "Reserved", "Purchased", null], "nullable": true, "type": "string" }, "timing": { "additionalProperties": false, "properties": { "arrival": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "checkIn": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "checkOut": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "departure": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "timeZone": { "type": "string" } }, "type": "object" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "visitId", "name", "kind", "status", "timing", "address", "reference", "notes", "sourceLinks", "hostLinks", "documentLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" } }, "required": [ "captures", "ideas", "associations", "memberships", "events", "journeys", "stays" ], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } ] } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "409": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "409" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "tags": ["mobileTripCaptures"] } }, "/mobile/trips/{tripId}/captures/attach": { "post": { "operationId": "mobileTripCaptures.attach", "parameters": [ { "in": "path", "name": "tripId", "required": true, "schema": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "command": { "additionalProperties": false, "properties": { "attachment": { "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["task"], "type": "string" }, "taskId": { "pattern": "^[A-Za-z0-9_-]{1,72}$", "type": "string" } }, "required": ["kind", "taskId"], "type": "object" }, { "additionalProperties": false, "properties": { "documentId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["document"], "type": "string" }, "taskId": { "pattern": "^[A-Za-z0-9_-]{1,72}$", "type": "string" } }, "required": ["kind", "documentId"], "type": "object" } ] }, "expectedRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["capture.attach"], "type": "string" } }, "required": ["kind", "id", "expectedRevision", "attachment"], "type": "object" }, "operationId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } }, "required": ["operationId", "command"], "type": "object" } } }, "description": "Body" }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "current": { "additionalProperties": false, "properties": { "associations": { "items": { "additionalProperties": false, "properties": { "captureId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "provenance": { "enum": ["existing", "created"], "type": "string" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "sourceRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "target": { "oneOf": [ { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["idea"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["event"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["journey"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["stay"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "kind": { "enum": ["contact"], "type": "string" }, "reference": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" } }, "required": ["kind", "reference"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "captureId", "target", "provenance", "sourceRevision", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "captures": { "items": { "additionalProperties": false, "properties": { "attachments": { "items": { "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["task"], "type": "string" }, "taskId": { "pattern": "^[A-Za-z0-9_-]{1,72}$", "type": "string" } }, "required": ["kind", "taskId"], "type": "object" }, { "additionalProperties": false, "properties": { "documentId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["document"], "type": "string" }, "taskId": { "pattern": "^[A-Za-z0-9_-]{1,72}$", "type": "string" } }, "required": ["kind", "documentId"], "type": "object" } ] }, "type": "array" }, "classification": { "enum": ["idea", "note", "event", "link", "document", null], "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "notes": { "type": "string" }, "originalText": { "type": "string" }, "originalUrl": { "nullable": true, "type": "string" }, "placeId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "title": { "nullable": true, "type": "string" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "originalText", "originalUrl", "attachments", "title", "notes", "classification", "placeId", "visitId", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "events": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "arrangement": { "enum": ["Booked", "Agreed", "Not arranged", "Not needed", null], "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "documentLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "intention": { "enum": ["In plan", "Considering", "Alternative", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "organiserLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "purchase": { "enum": ["Purchased", null], "nullable": true, "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "sourceUrl": { "format": "uri", "nullable": true, "type": "string" }, "ticketUrl": { "format": "uri", "nullable": true, "type": "string" }, "timing": { "additionalProperties": false, "properties": { "end": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "endTime": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "start": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "startTime": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "timeZone": { "type": "string" } }, "type": "object" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "venueLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "visitId", "name", "intention", "arrangement", "purchase", "timing", "address", "reference", "sourceUrl", "ticketUrl", "notes", "sourceLinks", "venueLinks", "organiserLinks", "documentLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "ideas": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "contactLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" }, "type": "array" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["destination", "place", "activity", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "placeId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "purpose": { "enum": ["visit", "meet-people", "see-someone", "other", null], "nullable": true, "type": "string" }, "reason": { "type": "string" }, "recommendations": { "items": { "additionalProperties": false, "properties": { "contact": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" }, "note": { "type": "string" } }, "required": ["contact", "note"], "type": "object" }, "type": "array" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "status": { "enum": ["Saved", "Considering", "In plan", null], "nullable": true, "type": "string" }, "timing": { "oneOf": [ { "additionalProperties": false, "properties": { "mode": { "enum": ["none"], "type": "string" } }, "required": ["mode"], "type": "object" }, { "additionalProperties": false, "properties": { "mode": { "enum": ["month"], "type": "string" }, "month": { "pattern": "^\\d{4}-(0[1-9]|1[0-2])$", "type": "string" } }, "required": ["mode"], "type": "object" }, { "additionalProperties": false, "properties": { "from": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "mode": { "enum": ["dates"], "type": "string" }, "to": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" } }, "required": ["mode"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "name", "kind", "purpose", "status", "reason", "notes", "address", "placeId", "visitId", "timing", "sourceLinks", "contactLinks", "recommendations", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "journeys": { "items": { "additionalProperties": false, "properties": { "buffers": { "additionalProperties": false, "properties": { "airportBufferMinutes": { "minimum": 0, "type": "number" }, "minimumConnectionMinutes": { "minimum": 0, "type": "number" } }, "type": "object" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "name", "reference", "notes", "sourceLinks", "buffers", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "memberships": { "items": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "source": { "oneOf": [ { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["capture"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["idea"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["event"], "type": "string" } }, "required": ["kind", "id"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "source", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "stays": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "documentLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "hostLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["hotel", "friend", "family", "other", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "status": { "enum": ["Considering", "Agreed", "Reserved", "Purchased", null], "nullable": true, "type": "string" }, "timing": { "additionalProperties": false, "properties": { "arrival": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "checkIn": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "checkOut": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "departure": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "timeZone": { "type": "string" } }, "type": "object" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "visitId", "name", "kind", "status", "timing", "address", "reference", "notes", "sourceLinks", "hostLinks", "documentLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" } }, "required": [ "captures", "ideas", "associations", "memberships", "events", "journeys", "stays" ], "type": "object" }, "receipt": { "additionalProperties": false, "properties": { "associations": { "items": { "additionalProperties": false, "properties": { "captureId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "provenance": { "enum": ["existing", "created"], "type": "string" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "sourceRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "target": { "oneOf": [ { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["idea"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["event"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["journey"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["stay"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "kind": { "enum": ["contact"], "type": "string" }, "reference": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" } }, "required": ["kind", "reference"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "captureId", "target", "provenance", "sourceRevision", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "captures": { "items": { "additionalProperties": false, "properties": { "attachments": { "items": { "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["task"], "type": "string" }, "taskId": { "pattern": "^[A-Za-z0-9_-]{1,72}$", "type": "string" } }, "required": ["kind", "taskId"], "type": "object" }, { "additionalProperties": false, "properties": { "documentId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["document"], "type": "string" }, "taskId": { "pattern": "^[A-Za-z0-9_-]{1,72}$", "type": "string" } }, "required": ["kind", "documentId"], "type": "object" } ] }, "type": "array" }, "classification": { "enum": ["idea", "note", "event", "link", "document", null], "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "notes": { "type": "string" }, "originalText": { "type": "string" }, "originalUrl": { "nullable": true, "type": "string" }, "placeId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "title": { "nullable": true, "type": "string" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "originalText", "originalUrl", "attachments", "title", "notes", "classification", "placeId", "visitId", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "events": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "arrangement": { "enum": ["Booked", "Agreed", "Not arranged", "Not needed", null], "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "documentLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "intention": { "enum": ["In plan", "Considering", "Alternative", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "organiserLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "purchase": { "enum": ["Purchased", null], "nullable": true, "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "sourceUrl": { "format": "uri", "nullable": true, "type": "string" }, "ticketUrl": { "format": "uri", "nullable": true, "type": "string" }, "timing": { "additionalProperties": false, "properties": { "end": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "endTime": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "start": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "startTime": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "timeZone": { "type": "string" } }, "type": "object" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "venueLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "visitId", "name", "intention", "arrangement", "purchase", "timing", "address", "reference", "sourceUrl", "ticketUrl", "notes", "sourceLinks", "venueLinks", "organiserLinks", "documentLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "ideas": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "contactLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" }, "type": "array" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["destination", "place", "activity", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "placeId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "purpose": { "enum": ["visit", "meet-people", "see-someone", "other", null], "nullable": true, "type": "string" }, "reason": { "type": "string" }, "recommendations": { "items": { "additionalProperties": false, "properties": { "contact": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" }, "note": { "type": "string" } }, "required": ["contact", "note"], "type": "object" }, "type": "array" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "status": { "enum": ["Saved", "Considering", "In plan", null], "nullable": true, "type": "string" }, "timing": { "oneOf": [ { "additionalProperties": false, "properties": { "mode": { "enum": ["none"], "type": "string" } }, "required": ["mode"], "type": "object" }, { "additionalProperties": false, "properties": { "mode": { "enum": ["month"], "type": "string" }, "month": { "pattern": "^\\d{4}-(0[1-9]|1[0-2])$", "type": "string" } }, "required": ["mode"], "type": "object" }, { "additionalProperties": false, "properties": { "from": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "mode": { "enum": ["dates"], "type": "string" }, "to": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" } }, "required": ["mode"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "name", "kind", "purpose", "status", "reason", "notes", "address", "placeId", "visitId", "timing", "sourceLinks", "contactLinks", "recommendations", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "journeys": { "items": { "additionalProperties": false, "properties": { "buffers": { "additionalProperties": false, "properties": { "airportBufferMinutes": { "minimum": 0, "type": "number" }, "minimumConnectionMinutes": { "minimum": 0, "type": "number" } }, "type": "object" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "name", "reference", "notes", "sourceLinks", "buffers", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "memberships": { "items": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "source": { "oneOf": [ { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["capture"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["idea"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["event"], "type": "string" } }, "required": ["kind", "id"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "source", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "operationId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "stays": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "documentLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "hostLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["hotel", "friend", "family", "other", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "status": { "enum": ["Considering", "Agreed", "Reserved", "Purchased", null], "nullable": true, "type": "string" }, "timing": { "additionalProperties": false, "properties": { "arrival": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "checkIn": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "checkOut": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "departure": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "timeZone": { "type": "string" } }, "type": "object" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "visitId", "name", "kind", "status", "timing", "address", "reference", "notes", "sourceLinks", "hostLinks", "documentLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "undoneOperationId": { "format": "uuid", "nullable": true, "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } }, "required": [ "captures", "ideas", "associations", "memberships", "events", "journeys", "stays", "operationId", "undoneOperationId" ], "type": "object" }, "replayed": { "type": "boolean" }, "undone": { "type": "boolean" } }, "required": ["receipt", "current", "undone", "replayed"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } ] } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "409": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "409" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "tags": ["mobileTripCaptures"] } }, "/mobile/trips/{tripId}/captures/create": { "post": { "operationId": "mobileTripCaptures.create", "parameters": [ { "in": "path", "name": "tripId", "required": true, "schema": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "command": { "additionalProperties": false, "properties": { "explore": { "type": "boolean" }, "input": { "additionalProperties": false, "properties": { "attachments": { "items": { "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["task"], "type": "string" }, "taskId": { "pattern": "^[A-Za-z0-9_-]{1,72}$", "type": "string" } }, "required": ["kind", "taskId"], "type": "object" }, { "additionalProperties": false, "properties": { "documentId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["document"], "type": "string" }, "taskId": { "pattern": "^[A-Za-z0-9_-]{1,72}$", "type": "string" } }, "required": ["kind", "documentId"], "type": "object" } ] }, "type": "array" }, "classification": { "enum": ["idea", "note", "event", "link", "document", null], "nullable": true, "type": "string" }, "notes": { "type": "string" }, "originalText": { "type": "string" }, "originalUrl": { "nullable": true, "type": "string" }, "placeId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "title": { "nullable": true, "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": ["originalText"], "type": "object" }, "kind": { "enum": ["capture.create"], "type": "string" } }, "required": ["kind", "input"], "type": "object" }, "operationId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } }, "required": ["operationId", "command"], "type": "object" } } }, "description": "Body" }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "current": { "additionalProperties": false, "properties": { "associations": { "items": { "additionalProperties": false, "properties": { "captureId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "provenance": { "enum": ["existing", "created"], "type": "string" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "sourceRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "target": { "oneOf": [ { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["idea"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["event"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["journey"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["stay"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "kind": { "enum": ["contact"], "type": "string" }, "reference": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" } }, "required": ["kind", "reference"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "captureId", "target", "provenance", "sourceRevision", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "captures": { "items": { "additionalProperties": false, "properties": { "attachments": { "items": { "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["task"], "type": "string" }, "taskId": { "pattern": "^[A-Za-z0-9_-]{1,72}$", "type": "string" } }, "required": ["kind", "taskId"], "type": "object" }, { "additionalProperties": false, "properties": { "documentId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["document"], "type": "string" }, "taskId": { "pattern": "^[A-Za-z0-9_-]{1,72}$", "type": "string" } }, "required": ["kind", "documentId"], "type": "object" } ] }, "type": "array" }, "classification": { "enum": ["idea", "note", "event", "link", "document", null], "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "notes": { "type": "string" }, "originalText": { "type": "string" }, "originalUrl": { "nullable": true, "type": "string" }, "placeId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "title": { "nullable": true, "type": "string" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "originalText", "originalUrl", "attachments", "title", "notes", "classification", "placeId", "visitId", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "events": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "arrangement": { "enum": ["Booked", "Agreed", "Not arranged", "Not needed", null], "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "documentLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "intention": { "enum": ["In plan", "Considering", "Alternative", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "organiserLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "purchase": { "enum": ["Purchased", null], "nullable": true, "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "sourceUrl": { "format": "uri", "nullable": true, "type": "string" }, "ticketUrl": { "format": "uri", "nullable": true, "type": "string" }, "timing": { "additionalProperties": false, "properties": { "end": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "endTime": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "start": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "startTime": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "timeZone": { "type": "string" } }, "type": "object" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "venueLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "visitId", "name", "intention", "arrangement", "purchase", "timing", "address", "reference", "sourceUrl", "ticketUrl", "notes", "sourceLinks", "venueLinks", "organiserLinks", "documentLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "ideas": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "contactLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" }, "type": "array" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["destination", "place", "activity", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "placeId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "purpose": { "enum": ["visit", "meet-people", "see-someone", "other", null], "nullable": true, "type": "string" }, "reason": { "type": "string" }, "recommendations": { "items": { "additionalProperties": false, "properties": { "contact": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" }, "note": { "type": "string" } }, "required": ["contact", "note"], "type": "object" }, "type": "array" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "status": { "enum": ["Saved", "Considering", "In plan", null], "nullable": true, "type": "string" }, "timing": { "oneOf": [ { "additionalProperties": false, "properties": { "mode": { "enum": ["none"], "type": "string" } }, "required": ["mode"], "type": "object" }, { "additionalProperties": false, "properties": { "mode": { "enum": ["month"], "type": "string" }, "month": { "pattern": "^\\d{4}-(0[1-9]|1[0-2])$", "type": "string" } }, "required": ["mode"], "type": "object" }, { "additionalProperties": false, "properties": { "from": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "mode": { "enum": ["dates"], "type": "string" }, "to": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" } }, "required": ["mode"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "name", "kind", "purpose", "status", "reason", "notes", "address", "placeId", "visitId", "timing", "sourceLinks", "contactLinks", "recommendations", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "journeys": { "items": { "additionalProperties": false, "properties": { "buffers": { "additionalProperties": false, "properties": { "airportBufferMinutes": { "minimum": 0, "type": "number" }, "minimumConnectionMinutes": { "minimum": 0, "type": "number" } }, "type": "object" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "name", "reference", "notes", "sourceLinks", "buffers", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "memberships": { "items": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "source": { "oneOf": [ { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["capture"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["idea"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["event"], "type": "string" } }, "required": ["kind", "id"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "source", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "stays": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "documentLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "hostLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["hotel", "friend", "family", "other", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "status": { "enum": ["Considering", "Agreed", "Reserved", "Purchased", null], "nullable": true, "type": "string" }, "timing": { "additionalProperties": false, "properties": { "arrival": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "checkIn": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "checkOut": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "departure": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "timeZone": { "type": "string" } }, "type": "object" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "visitId", "name", "kind", "status", "timing", "address", "reference", "notes", "sourceLinks", "hostLinks", "documentLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" } }, "required": [ "captures", "ideas", "associations", "memberships", "events", "journeys", "stays" ], "type": "object" }, "receipt": { "additionalProperties": false, "properties": { "associations": { "items": { "additionalProperties": false, "properties": { "captureId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "provenance": { "enum": ["existing", "created"], "type": "string" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "sourceRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "target": { "oneOf": [ { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["idea"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["event"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["journey"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["stay"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "kind": { "enum": ["contact"], "type": "string" }, "reference": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" } }, "required": ["kind", "reference"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "captureId", "target", "provenance", "sourceRevision", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "captures": { "items": { "additionalProperties": false, "properties": { "attachments": { "items": { "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["task"], "type": "string" }, "taskId": { "pattern": "^[A-Za-z0-9_-]{1,72}$", "type": "string" } }, "required": ["kind", "taskId"], "type": "object" }, { "additionalProperties": false, "properties": { "documentId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["document"], "type": "string" }, "taskId": { "pattern": "^[A-Za-z0-9_-]{1,72}$", "type": "string" } }, "required": ["kind", "documentId"], "type": "object" } ] }, "type": "array" }, "classification": { "enum": ["idea", "note", "event", "link", "document", null], "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "notes": { "type": "string" }, "originalText": { "type": "string" }, "originalUrl": { "nullable": true, "type": "string" }, "placeId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "title": { "nullable": true, "type": "string" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "originalText", "originalUrl", "attachments", "title", "notes", "classification", "placeId", "visitId", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "events": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "arrangement": { "enum": ["Booked", "Agreed", "Not arranged", "Not needed", null], "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "documentLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "intention": { "enum": ["In plan", "Considering", "Alternative", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "organiserLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "purchase": { "enum": ["Purchased", null], "nullable": true, "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "sourceUrl": { "format": "uri", "nullable": true, "type": "string" }, "ticketUrl": { "format": "uri", "nullable": true, "type": "string" }, "timing": { "additionalProperties": false, "properties": { "end": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "endTime": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "start": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "startTime": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "timeZone": { "type": "string" } }, "type": "object" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "venueLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "visitId", "name", "intention", "arrangement", "purchase", "timing", "address", "reference", "sourceUrl", "ticketUrl", "notes", "sourceLinks", "venueLinks", "organiserLinks", "documentLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "ideas": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "contactLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" }, "type": "array" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["destination", "place", "activity", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "placeId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "purpose": { "enum": ["visit", "meet-people", "see-someone", "other", null], "nullable": true, "type": "string" }, "reason": { "type": "string" }, "recommendations": { "items": { "additionalProperties": false, "properties": { "contact": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" }, "note": { "type": "string" } }, "required": ["contact", "note"], "type": "object" }, "type": "array" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "status": { "enum": ["Saved", "Considering", "In plan", null], "nullable": true, "type": "string" }, "timing": { "oneOf": [ { "additionalProperties": false, "properties": { "mode": { "enum": ["none"], "type": "string" } }, "required": ["mode"], "type": "object" }, { "additionalProperties": false, "properties": { "mode": { "enum": ["month"], "type": "string" }, "month": { "pattern": "^\\d{4}-(0[1-9]|1[0-2])$", "type": "string" } }, "required": ["mode"], "type": "object" }, { "additionalProperties": false, "properties": { "from": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "mode": { "enum": ["dates"], "type": "string" }, "to": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" } }, "required": ["mode"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "name", "kind", "purpose", "status", "reason", "notes", "address", "placeId", "visitId", "timing", "sourceLinks", "contactLinks", "recommendations", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "journeys": { "items": { "additionalProperties": false, "properties": { "buffers": { "additionalProperties": false, "properties": { "airportBufferMinutes": { "minimum": 0, "type": "number" }, "minimumConnectionMinutes": { "minimum": 0, "type": "number" } }, "type": "object" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "name", "reference", "notes", "sourceLinks", "buffers", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "memberships": { "items": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "source": { "oneOf": [ { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["capture"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["idea"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["event"], "type": "string" } }, "required": ["kind", "id"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "source", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "operationId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "stays": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "documentLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "hostLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["hotel", "friend", "family", "other", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "status": { "enum": ["Considering", "Agreed", "Reserved", "Purchased", null], "nullable": true, "type": "string" }, "timing": { "additionalProperties": false, "properties": { "arrival": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "checkIn": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "checkOut": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "departure": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "timeZone": { "type": "string" } }, "type": "object" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "visitId", "name", "kind", "status", "timing", "address", "reference", "notes", "sourceLinks", "hostLinks", "documentLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "undoneOperationId": { "format": "uuid", "nullable": true, "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } }, "required": [ "captures", "ideas", "associations", "memberships", "events", "journeys", "stays", "operationId", "undoneOperationId" ], "type": "object" }, "replayed": { "type": "boolean" }, "undone": { "type": "boolean" } }, "required": ["receipt", "current", "undone", "replayed"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } ] } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "409": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "409" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "tags": ["mobileTripCaptures"] } }, "/mobile/trips/{tripId}/captures/undo": { "post": { "operationId": "mobileTripCaptures.undo", "parameters": [ { "in": "path", "name": "tripId", "required": true, "schema": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "command": { "additionalProperties": false, "properties": { "kind": { "enum": ["undo"], "type": "string" }, "targetOperationId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } }, "required": ["kind", "targetOperationId"], "type": "object" }, "operationId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } }, "required": ["operationId", "command"], "type": "object" } } }, "description": "Body" }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "current": { "additionalProperties": false, "properties": { "associations": { "items": { "additionalProperties": false, "properties": { "captureId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "provenance": { "enum": ["existing", "created"], "type": "string" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "sourceRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "target": { "oneOf": [ { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["idea"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["event"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["journey"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["stay"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "kind": { "enum": ["contact"], "type": "string" }, "reference": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" } }, "required": ["kind", "reference"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "captureId", "target", "provenance", "sourceRevision", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "captures": { "items": { "additionalProperties": false, "properties": { "attachments": { "items": { "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["task"], "type": "string" }, "taskId": { "pattern": "^[A-Za-z0-9_-]{1,72}$", "type": "string" } }, "required": ["kind", "taskId"], "type": "object" }, { "additionalProperties": false, "properties": { "documentId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["document"], "type": "string" }, "taskId": { "pattern": "^[A-Za-z0-9_-]{1,72}$", "type": "string" } }, "required": ["kind", "documentId"], "type": "object" } ] }, "type": "array" }, "classification": { "enum": ["idea", "note", "event", "link", "document", null], "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "notes": { "type": "string" }, "originalText": { "type": "string" }, "originalUrl": { "nullable": true, "type": "string" }, "placeId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "title": { "nullable": true, "type": "string" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "originalText", "originalUrl", "attachments", "title", "notes", "classification", "placeId", "visitId", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "events": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "arrangement": { "enum": ["Booked", "Agreed", "Not arranged", "Not needed", null], "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "documentLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "intention": { "enum": ["In plan", "Considering", "Alternative", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "organiserLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "purchase": { "enum": ["Purchased", null], "nullable": true, "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "sourceUrl": { "format": "uri", "nullable": true, "type": "string" }, "ticketUrl": { "format": "uri", "nullable": true, "type": "string" }, "timing": { "additionalProperties": false, "properties": { "end": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "endTime": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "start": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "startTime": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "timeZone": { "type": "string" } }, "type": "object" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "venueLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "visitId", "name", "intention", "arrangement", "purchase", "timing", "address", "reference", "sourceUrl", "ticketUrl", "notes", "sourceLinks", "venueLinks", "organiserLinks", "documentLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "ideas": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "contactLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" }, "type": "array" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["destination", "place", "activity", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "placeId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "purpose": { "enum": ["visit", "meet-people", "see-someone", "other", null], "nullable": true, "type": "string" }, "reason": { "type": "string" }, "recommendations": { "items": { "additionalProperties": false, "properties": { "contact": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" }, "note": { "type": "string" } }, "required": ["contact", "note"], "type": "object" }, "type": "array" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "status": { "enum": ["Saved", "Considering", "In plan", null], "nullable": true, "type": "string" }, "timing": { "oneOf": [ { "additionalProperties": false, "properties": { "mode": { "enum": ["none"], "type": "string" } }, "required": ["mode"], "type": "object" }, { "additionalProperties": false, "properties": { "mode": { "enum": ["month"], "type": "string" }, "month": { "pattern": "^\\d{4}-(0[1-9]|1[0-2])$", "type": "string" } }, "required": ["mode"], "type": "object" }, { "additionalProperties": false, "properties": { "from": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "mode": { "enum": ["dates"], "type": "string" }, "to": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" } }, "required": ["mode"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "name", "kind", "purpose", "status", "reason", "notes", "address", "placeId", "visitId", "timing", "sourceLinks", "contactLinks", "recommendations", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "journeys": { "items": { "additionalProperties": false, "properties": { "buffers": { "additionalProperties": false, "properties": { "airportBufferMinutes": { "minimum": 0, "type": "number" }, "minimumConnectionMinutes": { "minimum": 0, "type": "number" } }, "type": "object" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "name", "reference", "notes", "sourceLinks", "buffers", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "memberships": { "items": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "source": { "oneOf": [ { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["capture"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["idea"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["event"], "type": "string" } }, "required": ["kind", "id"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "source", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "stays": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "documentLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "hostLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["hotel", "friend", "family", "other", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "status": { "enum": ["Considering", "Agreed", "Reserved", "Purchased", null], "nullable": true, "type": "string" }, "timing": { "additionalProperties": false, "properties": { "arrival": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "checkIn": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "checkOut": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "departure": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "timeZone": { "type": "string" } }, "type": "object" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "visitId", "name", "kind", "status", "timing", "address", "reference", "notes", "sourceLinks", "hostLinks", "documentLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" } }, "required": [ "captures", "ideas", "associations", "memberships", "events", "journeys", "stays" ], "type": "object" }, "receipt": { "additionalProperties": false, "properties": { "associations": { "items": { "additionalProperties": false, "properties": { "captureId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "provenance": { "enum": ["existing", "created"], "type": "string" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "sourceRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "target": { "oneOf": [ { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["idea"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["event"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["journey"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["stay"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "kind": { "enum": ["contact"], "type": "string" }, "reference": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" } }, "required": ["kind", "reference"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "captureId", "target", "provenance", "sourceRevision", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "captures": { "items": { "additionalProperties": false, "properties": { "attachments": { "items": { "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["task"], "type": "string" }, "taskId": { "pattern": "^[A-Za-z0-9_-]{1,72}$", "type": "string" } }, "required": ["kind", "taskId"], "type": "object" }, { "additionalProperties": false, "properties": { "documentId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["document"], "type": "string" }, "taskId": { "pattern": "^[A-Za-z0-9_-]{1,72}$", "type": "string" } }, "required": ["kind", "documentId"], "type": "object" } ] }, "type": "array" }, "classification": { "enum": ["idea", "note", "event", "link", "document", null], "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "notes": { "type": "string" }, "originalText": { "type": "string" }, "originalUrl": { "nullable": true, "type": "string" }, "placeId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "title": { "nullable": true, "type": "string" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "originalText", "originalUrl", "attachments", "title", "notes", "classification", "placeId", "visitId", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "events": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "arrangement": { "enum": ["Booked", "Agreed", "Not arranged", "Not needed", null], "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "documentLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "intention": { "enum": ["In plan", "Considering", "Alternative", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "organiserLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "purchase": { "enum": ["Purchased", null], "nullable": true, "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "sourceUrl": { "format": "uri", "nullable": true, "type": "string" }, "ticketUrl": { "format": "uri", "nullable": true, "type": "string" }, "timing": { "additionalProperties": false, "properties": { "end": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "endTime": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "start": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "startTime": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "timeZone": { "type": "string" } }, "type": "object" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "venueLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "visitId", "name", "intention", "arrangement", "purchase", "timing", "address", "reference", "sourceUrl", "ticketUrl", "notes", "sourceLinks", "venueLinks", "organiserLinks", "documentLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "ideas": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "contactLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" }, "type": "array" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["destination", "place", "activity", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "placeId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "purpose": { "enum": ["visit", "meet-people", "see-someone", "other", null], "nullable": true, "type": "string" }, "reason": { "type": "string" }, "recommendations": { "items": { "additionalProperties": false, "properties": { "contact": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" }, "note": { "type": "string" } }, "required": ["contact", "note"], "type": "object" }, "type": "array" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "status": { "enum": ["Saved", "Considering", "In plan", null], "nullable": true, "type": "string" }, "timing": { "oneOf": [ { "additionalProperties": false, "properties": { "mode": { "enum": ["none"], "type": "string" } }, "required": ["mode"], "type": "object" }, { "additionalProperties": false, "properties": { "mode": { "enum": ["month"], "type": "string" }, "month": { "pattern": "^\\d{4}-(0[1-9]|1[0-2])$", "type": "string" } }, "required": ["mode"], "type": "object" }, { "additionalProperties": false, "properties": { "from": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "mode": { "enum": ["dates"], "type": "string" }, "to": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" } }, "required": ["mode"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "name", "kind", "purpose", "status", "reason", "notes", "address", "placeId", "visitId", "timing", "sourceLinks", "contactLinks", "recommendations", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "journeys": { "items": { "additionalProperties": false, "properties": { "buffers": { "additionalProperties": false, "properties": { "airportBufferMinutes": { "minimum": 0, "type": "number" }, "minimumConnectionMinutes": { "minimum": 0, "type": "number" } }, "type": "object" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "name", "reference", "notes", "sourceLinks", "buffers", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "memberships": { "items": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "source": { "oneOf": [ { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["capture"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["idea"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["event"], "type": "string" } }, "required": ["kind", "id"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "source", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "operationId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "stays": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "documentLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "hostLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["hotel", "friend", "family", "other", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "status": { "enum": ["Considering", "Agreed", "Reserved", "Purchased", null], "nullable": true, "type": "string" }, "timing": { "additionalProperties": false, "properties": { "arrival": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "checkIn": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "checkOut": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "departure": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "timeZone": { "type": "string" } }, "type": "object" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "visitId", "name", "kind", "status", "timing", "address", "reference", "notes", "sourceLinks", "hostLinks", "documentLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "undoneOperationId": { "format": "uuid", "nullable": true, "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } }, "required": [ "captures", "ideas", "associations", "memberships", "events", "journeys", "stays", "operationId", "undoneOperationId" ], "type": "object" }, "replayed": { "type": "boolean" }, "undone": { "type": "boolean" } }, "required": ["receipt", "current", "undone", "replayed"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } ] } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "409": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "409" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "tags": ["mobileTripCaptures"] } }, "/mobile/trips/{tripId}/captures/update": { "post": { "operationId": "mobileTripCaptures.update", "parameters": [ { "in": "path", "name": "tripId", "required": true, "schema": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "command": { "additionalProperties": false, "properties": { "expectedRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "input": { "additionalProperties": false, "properties": { "classification": { "enum": ["idea", "note", "event", "link", "document", null], "nullable": true, "type": "string" }, "notes": { "type": "string" }, "placeId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "title": { "nullable": true, "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "type": "object" }, "kind": { "enum": ["capture.update"], "type": "string" } }, "required": ["kind", "id", "expectedRevision", "input"], "type": "object" }, "operationId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } }, "required": ["operationId", "command"], "type": "object" } } }, "description": "Body" }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "current": { "additionalProperties": false, "properties": { "associations": { "items": { "additionalProperties": false, "properties": { "captureId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "provenance": { "enum": ["existing", "created"], "type": "string" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "sourceRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "target": { "oneOf": [ { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["idea"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["event"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["journey"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["stay"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "kind": { "enum": ["contact"], "type": "string" }, "reference": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" } }, "required": ["kind", "reference"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "captureId", "target", "provenance", "sourceRevision", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "captures": { "items": { "additionalProperties": false, "properties": { "attachments": { "items": { "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["task"], "type": "string" }, "taskId": { "pattern": "^[A-Za-z0-9_-]{1,72}$", "type": "string" } }, "required": ["kind", "taskId"], "type": "object" }, { "additionalProperties": false, "properties": { "documentId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["document"], "type": "string" }, "taskId": { "pattern": "^[A-Za-z0-9_-]{1,72}$", "type": "string" } }, "required": ["kind", "documentId"], "type": "object" } ] }, "type": "array" }, "classification": { "enum": ["idea", "note", "event", "link", "document", null], "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "notes": { "type": "string" }, "originalText": { "type": "string" }, "originalUrl": { "nullable": true, "type": "string" }, "placeId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "title": { "nullable": true, "type": "string" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "originalText", "originalUrl", "attachments", "title", "notes", "classification", "placeId", "visitId", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "events": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "arrangement": { "enum": ["Booked", "Agreed", "Not arranged", "Not needed", null], "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "documentLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "intention": { "enum": ["In plan", "Considering", "Alternative", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "organiserLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "purchase": { "enum": ["Purchased", null], "nullable": true, "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "sourceUrl": { "format": "uri", "nullable": true, "type": "string" }, "ticketUrl": { "format": "uri", "nullable": true, "type": "string" }, "timing": { "additionalProperties": false, "properties": { "end": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "endTime": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "start": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "startTime": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "timeZone": { "type": "string" } }, "type": "object" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "venueLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "visitId", "name", "intention", "arrangement", "purchase", "timing", "address", "reference", "sourceUrl", "ticketUrl", "notes", "sourceLinks", "venueLinks", "organiserLinks", "documentLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "ideas": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "contactLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" }, "type": "array" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["destination", "place", "activity", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "placeId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "purpose": { "enum": ["visit", "meet-people", "see-someone", "other", null], "nullable": true, "type": "string" }, "reason": { "type": "string" }, "recommendations": { "items": { "additionalProperties": false, "properties": { "contact": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" }, "note": { "type": "string" } }, "required": ["contact", "note"], "type": "object" }, "type": "array" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "status": { "enum": ["Saved", "Considering", "In plan", null], "nullable": true, "type": "string" }, "timing": { "oneOf": [ { "additionalProperties": false, "properties": { "mode": { "enum": ["none"], "type": "string" } }, "required": ["mode"], "type": "object" }, { "additionalProperties": false, "properties": { "mode": { "enum": ["month"], "type": "string" }, "month": { "pattern": "^\\d{4}-(0[1-9]|1[0-2])$", "type": "string" } }, "required": ["mode"], "type": "object" }, { "additionalProperties": false, "properties": { "from": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "mode": { "enum": ["dates"], "type": "string" }, "to": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" } }, "required": ["mode"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "name", "kind", "purpose", "status", "reason", "notes", "address", "placeId", "visitId", "timing", "sourceLinks", "contactLinks", "recommendations", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "journeys": { "items": { "additionalProperties": false, "properties": { "buffers": { "additionalProperties": false, "properties": { "airportBufferMinutes": { "minimum": 0, "type": "number" }, "minimumConnectionMinutes": { "minimum": 0, "type": "number" } }, "type": "object" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "name", "reference", "notes", "sourceLinks", "buffers", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "memberships": { "items": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "source": { "oneOf": [ { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["capture"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["idea"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["event"], "type": "string" } }, "required": ["kind", "id"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "source", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "stays": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "documentLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "hostLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["hotel", "friend", "family", "other", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "status": { "enum": ["Considering", "Agreed", "Reserved", "Purchased", null], "nullable": true, "type": "string" }, "timing": { "additionalProperties": false, "properties": { "arrival": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "checkIn": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "checkOut": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "departure": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "timeZone": { "type": "string" } }, "type": "object" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "visitId", "name", "kind", "status", "timing", "address", "reference", "notes", "sourceLinks", "hostLinks", "documentLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" } }, "required": [ "captures", "ideas", "associations", "memberships", "events", "journeys", "stays" ], "type": "object" }, "receipt": { "additionalProperties": false, "properties": { "associations": { "items": { "additionalProperties": false, "properties": { "captureId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "provenance": { "enum": ["existing", "created"], "type": "string" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "sourceRevision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "target": { "oneOf": [ { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["idea"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["event"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["journey"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["stay"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "kind": { "enum": ["contact"], "type": "string" }, "reference": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" } }, "required": ["kind", "reference"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "captureId", "target", "provenance", "sourceRevision", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "captures": { "items": { "additionalProperties": false, "properties": { "attachments": { "items": { "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "enum": ["task"], "type": "string" }, "taskId": { "pattern": "^[A-Za-z0-9_-]{1,72}$", "type": "string" } }, "required": ["kind", "taskId"], "type": "object" }, { "additionalProperties": false, "properties": { "documentId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["document"], "type": "string" }, "taskId": { "pattern": "^[A-Za-z0-9_-]{1,72}$", "type": "string" } }, "required": ["kind", "documentId"], "type": "object" } ] }, "type": "array" }, "classification": { "enum": ["idea", "note", "event", "link", "document", null], "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "notes": { "type": "string" }, "originalText": { "type": "string" }, "originalUrl": { "nullable": true, "type": "string" }, "placeId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "title": { "nullable": true, "type": "string" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "originalText", "originalUrl", "attachments", "title", "notes", "classification", "placeId", "visitId", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "events": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "arrangement": { "enum": ["Booked", "Agreed", "Not arranged", "Not needed", null], "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "documentLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "intention": { "enum": ["In plan", "Considering", "Alternative", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "organiserLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "purchase": { "enum": ["Purchased", null], "nullable": true, "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "sourceUrl": { "format": "uri", "nullable": true, "type": "string" }, "ticketUrl": { "format": "uri", "nullable": true, "type": "string" }, "timing": { "additionalProperties": false, "properties": { "end": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "endTime": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "start": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "startTime": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "timeZone": { "type": "string" } }, "type": "object" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "venueLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "visitId", "name", "intention", "arrangement", "purchase", "timing", "address", "reference", "sourceUrl", "ticketUrl", "notes", "sourceLinks", "venueLinks", "organiserLinks", "documentLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "ideas": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "contactLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" }, "type": "array" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["destination", "place", "activity", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "placeId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "purpose": { "enum": ["visit", "meet-people", "see-someone", "other", null], "nullable": true, "type": "string" }, "reason": { "type": "string" }, "recommendations": { "items": { "additionalProperties": false, "properties": { "contact": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "pattern": "^pops:contacts\\/contact\\/[^/\\s]+$", "type": "string" } }, "required": ["uri"], "type": "object" }, "note": { "type": "string" } }, "required": ["contact", "note"], "type": "object" }, "type": "array" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "status": { "enum": ["Saved", "Considering", "In plan", null], "nullable": true, "type": "string" }, "timing": { "oneOf": [ { "additionalProperties": false, "properties": { "mode": { "enum": ["none"], "type": "string" } }, "required": ["mode"], "type": "object" }, { "additionalProperties": false, "properties": { "mode": { "enum": ["month"], "type": "string" }, "month": { "pattern": "^\\d{4}-(0[1-9]|1[0-2])$", "type": "string" } }, "required": ["mode"], "type": "object" }, { "additionalProperties": false, "properties": { "from": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "mode": { "enum": ["dates"], "type": "string" }, "to": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" } }, "required": ["mode"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "name", "kind", "purpose", "status", "reason", "notes", "address", "placeId", "visitId", "timing", "sourceLinks", "contactLinks", "recommendations", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "journeys": { "items": { "additionalProperties": false, "properties": { "buffers": { "additionalProperties": false, "properties": { "airportBufferMinutes": { "minimum": 0, "type": "number" }, "minimumConnectionMinutes": { "minimum": 0, "type": "number" } }, "type": "object" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "name", "reference", "notes", "sourceLinks", "buffers", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "memberships": { "items": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "removedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "revision": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "source": { "oneOf": [ { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["capture"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["idea"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["event"], "type": "string" } }, "required": ["kind", "id"], "type": "object" } ] }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "source", "revision", "removedAt", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "operationId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "stays": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "documentLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "hostLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["hotel", "friend", "family", "other", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "status": { "enum": ["Considering", "Agreed", "Reserved", "Purchased", null], "nullable": true, "type": "string" }, "timing": { "additionalProperties": false, "properties": { "arrival": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "checkIn": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "checkOut": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "departure": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "timeZone": { "type": "string" } }, "type": "object" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "visitId", "name", "kind", "status", "timing", "address", "reference", "notes", "sourceLinks", "hostLinks", "documentLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "undoneOperationId": { "format": "uuid", "nullable": true, "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } }, "required": [ "captures", "ideas", "associations", "memberships", "events", "journeys", "stays", "operationId", "undoneOperationId" ], "type": "object" }, "replayed": { "type": "boolean" }, "undone": { "type": "boolean" } }, "required": ["receipt", "current", "undone", "replayed"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } ] } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "409": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "409" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "tags": ["mobileTripCaptures"] } }, "/mobile/trips/{tripId}/route": { "get": { "operationId": "mobileTrips.getRoute", "parameters": [ { "in": "path", "name": "tripId", "required": true, "schema": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "missingSources": { "items": { "oneOf": [ { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["visit"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["journey"], "type": "string" } }, "required": ["kind", "id"], "type": "object" } ] }, "type": "array" }, "order": { "items": { "anyOf": [ { "oneOf": [ { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["visit"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["journey"], "type": "string" } }, "required": ["kind", "id"], "type": "object" } ] }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["gap"], "type": "string" } }, "required": ["kind", "id"], "type": "object" } ] }, "type": "array" }, "paths": { "items": { "additionalProperties": false, "properties": { "gapId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "members": { "items": { "oneOf": [ { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["visit"], "type": "string" } }, "required": ["kind", "id"], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["journey"], "type": "string" } }, "required": ["kind", "id"], "type": "object" } ] }, "type": "array" }, "state": { "enum": ["alternative", "applied"], "type": "string" }, "title": { "type": "string" } }, "required": ["id", "title", "gapId", "state", "members"], "type": "object" }, "type": "array" }, "revision": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["tripId", "revision", "order", "paths", "missingSources"], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Read canonical mixed route order, alternative paths, applied history and missing sources", "tags": ["mobileTrips"] } }, "/mobile/v2/trips/{id}": { "get": { "operationId": "mobileTrips.getTripV2", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "documentAssociations": { "items": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "documentId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "targetId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "targetKind": { "enum": ["trip", "visit", "journey", "stay", "event"], "type": "string" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": [ "id", "tripId", "documentId", "targetKind", "targetId", "createdAt" ], "type": "object" }, "type": "array" }, "events": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "arrangement": { "enum": ["Booked", "Agreed", "Not arranged", "Not needed", null], "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "documentLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "intention": { "enum": ["In plan", "Considering", "Alternative", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "organiserLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "purchase": { "enum": ["Purchased", null], "nullable": true, "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "sourceUrl": { "format": "uri", "nullable": true, "type": "string" }, "ticketUrl": { "format": "uri", "nullable": true, "type": "string" }, "timing": { "additionalProperties": false, "properties": { "end": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "endTime": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "start": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "startTime": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "timeZone": { "type": "string" } }, "type": "object" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "venueLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "visitId", "name", "intention", "arrangement", "purchase", "timing", "address", "reference", "sourceUrl", "ticketUrl", "notes", "sourceLinks", "venueLinks", "organiserLinks", "documentLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "journeyGroups": { "items": { "additionalProperties": false, "properties": { "alternativeJourneyIds": { "items": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "type": "array" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "currentJourneyId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "revision": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "currentJourneyId", "alternativeJourneyIds", "revision", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "journeys": { "items": { "additionalProperties": false, "properties": { "buffers": { "additionalProperties": false, "properties": { "airportBufferMinutes": { "minimum": 0, "type": "number" }, "minimumConnectionMinutes": { "minimum": 0, "type": "number" } }, "type": "object" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "legs": { "items": { "additionalProperties": false, "properties": { "arrangement": { "enum": ["Booked", "Agreed", "Not arranged", "Not needed", null], "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "from": { "additionalProperties": false, "properties": { "date": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "local": { "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d+)?)?$", "type": "string" }, "placeId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "sourceLabel": { "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "timeZone": { "type": "string" } }, "type": "object" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "intention": { "enum": ["In plan", "Considering", "Alternative", null], "nullable": true, "type": "string" }, "journeyId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "mode": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "operator": { "nullable": true, "type": "string" }, "purchase": { "enum": ["Purchased", null], "nullable": true, "type": "string" }, "reference": { "nullable": true, "type": "string" }, "service": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "to": { "additionalProperties": false, "properties": { "date": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "local": { "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d+)?)?$", "type": "string" }, "placeId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "sourceLabel": { "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "timeZone": { "type": "string" } }, "type": "object" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "journeyId", "mode", "from", "to", "intention", "arrangement", "purchase", "operator", "service", "reference", "notes", "sourceLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "name", "reference", "notes", "sourceLinks", "buffers", "createdAt", "updatedAt", "legs" ], "type": "object" }, "type": "array" }, "places": { "items": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "name": { "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": ["id", "name", "sourceLinks", "createdAt", "updatedAt"], "type": "object" }, "type": "array" }, "stays": { "items": { "additionalProperties": false, "properties": { "address": { "nullable": true, "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "documentLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "hostLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "kind": { "enum": ["hotel", "friend", "family", "other", null], "nullable": true, "type": "string" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "reference": { "nullable": true, "type": "string" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "status": { "enum": ["Considering", "Agreed", "Reserved", "Purchased", null], "nullable": true, "type": "string" }, "timing": { "additionalProperties": false, "properties": { "arrival": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "checkIn": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "checkOut": { "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$", "type": "string" }, "departure": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "timeZone": { "type": "string" } }, "type": "object" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "visitId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" } }, "required": [ "id", "tripId", "visitId", "name", "kind", "status", "timing", "address", "reference", "notes", "sourceLinks", "hostLinks", "documentLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "trip": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "destination": { "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "name": { "nullable": true, "type": "string" }, "notes": { "type": "string" }, "parentId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "nullable": true, "type": "integer" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "tagId": { "format": "uuid", "nullable": true, "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "when": { "type": "string" } }, "required": [ "id", "name", "destination", "when", "tagId", "parentId", "notes", "sourceLinks", "createdAt", "updatedAt" ], "type": "object" }, "visits": { "items": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "notes": { "type": "string" }, "placeId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "sourceLinks": { "items": { "additionalProperties": false, "properties": { "label": { "type": "string" }, "uri": { "anyOf": [ { "format": "uri", "type": "string" }, { "pattern": "^pops:[a-z][a-z0-9-]*\\/[^/\\s]+\\/[^/\\s]+$", "type": "string" } ] } }, "required": ["uri"], "type": "object" }, "type": "array" }, "timing": { "additionalProperties": false, "properties": { "arrival": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "departure": { "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "type": "string" }, "duration": { "additionalProperties": false, "properties": { "max": { "minimum": 0, "type": "number" }, "min": { "minimum": 0, "type": "number" }, "unit": { "enum": ["days", "weeks"], "type": "string" } }, "required": ["unit"], "type": "object" }, "month": { "additionalProperties": false, "properties": { "month": { "maximum": 12, "minimum": 1, "type": "integer" }, "part": { "enum": ["early", "middle", "late"], "type": "string" }, "year": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": ["year", "month"], "type": "object" } }, "type": "object" }, "tripId": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": [ "id", "tripId", "placeId", "timing", "notes", "sourceLinks", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" } }, "required": [ "trip", "places", "visits", "journeys", "journeyGroups", "stays", "events", "documentAssociations" ], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["invalid_cursor", "bfm.request.invalid"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.invalid_token"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "code": { "enum": ["bfm.auth.device_revoked"], "type": "string" }, "details": {}, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable"], "type": "object" }, { "additionalProperties": false, "properties": { "capability": { "type": "string" }, "code": { "enum": ["capability_not_granted"], "type": "string" }, "message": { "type": "string" } }, "required": ["code", "message", "capability"], "type": "object" } ] } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "404" }, "429": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "enum": ["rate_limited"], "type": "string" }, "message": { "type": "string" }, "retryAfterSeconds": { "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["code", "message", "retryAfterSeconds"], "type": "object" } } }, "description": "429" }, "502": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "502" }, "503": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "minLength": 1, "type": "string" }, "details": { "additionalProperties": {}, "properties": { "upstream": { "additionalProperties": false, "properties": { "pillar": { "type": "string" }, "status": { "maximum": 599, "minimum": 100, "type": "integer" } }, "required": ["pillar", "status"], "type": "object" } }, "required": ["upstream"], "type": "object" }, "message": { "type": "string" }, "requestId": { "minLength": 1, "type": "string" }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "requestId", "retryable", "details"], "type": "object" } } }, "description": "503" } }, "summary": "Read one day-aware trip with complete ordered sources and independent Journey endpoint precision", "tags": ["mobileTrips"] } }, "/operator/devices": { "get": { "operationId": "operator.listDevices", "parameters": [], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "devices": { "items": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "id": { "type": "string" }, "lastSeenAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "model": { "type": "string" }, "name": { "type": "string" }, "revokedAt": { "format": "date-time", "nullable": true, "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "subjectEmail": { "nullable": true, "type": "string" } }, "required": [ "id", "name", "model", "createdAt", "lastSeenAt", "revokedAt", "subjectEmail" ], "type": "object" }, "type": "array" } }, "required": ["devices"], "type": "object" } } }, "description": "200" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBody" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBody" } } }, "description": "403" } }, "summary": "List paired devices, revoked ones included. Never returns a token or a key", "tags": ["operator"] } }, "/operator/devices/{id}": { "delete": { "operationId": "operator.revokeDevice", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "minLength": 1, "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "alreadyRevoked": { "type": "boolean" }, "id": { "type": "string" }, "revokedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" } }, "required": ["id", "revokedAt", "alreadyRevoked"], "type": "object" } } }, "description": "200" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBody" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBody" } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBody" } } }, "description": "404" } }, "summary": "Soft-revoke a device and kill its refresh-token family in one transaction", "tags": ["operator"] } }, "/operator/devices/{id}/capabilities": { "get": { "operationId": "operator.getDeviceGrant", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "minLength": 1, "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "effective": { "items": { "type": "string" }, "type": "array" }, "id": { "minLength": 1, "type": "string" }, "mode": { "enum": ["tracks-default", "explicit"], "type": "string" }, "policyToken": { "pattern": "^[a-f0-9]{64}$", "type": "string" }, "revision": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "selectable": { "items": { "enum": [ "session.read", "finance.transactions.read", "finance.transactions.write", "finance.accounts.read", "purchases.read", "purchases.receipts.read", "purchases.receipts.write", "purchases.write", "purchases.edit", "inventory.read", "inventory.write", "barcode.read", "contacts.entities.read", "contacts.entities.write", "ego.chat", "ego.actions", "trips.read", "trips.capture.write", "trips.write", "documents.read", "documents.upload" ], "type": "string" }, "type": "array" }, "stored": { "items": { "type": "string" }, "type": "array" } }, "required": [ "id", "revision", "policyToken", "mode", "stored", "effective", "selectable" ], "type": "object" } } }, "description": "200" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBody" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBody" } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBody" } } }, "description": "404" }, "409": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBody" } } }, "description": "409" } }, "summary": "Read one live operator-owned device grant for explicit selection", "tags": ["operator"] }, "put": { "operationId": "operator.replaceDeviceGrant", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "minLength": 1, "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "capabilities": { "items": { "enum": [ "session.read", "finance.transactions.read", "finance.transactions.write", "finance.accounts.read", "purchases.read", "purchases.receipts.read", "purchases.receipts.write", "purchases.write", "purchases.edit", "inventory.read", "inventory.write", "barcode.read", "contacts.entities.read", "contacts.entities.write", "ego.chat", "ego.actions", "trips.read", "trips.capture.write", "trips.write", "documents.read", "documents.upload" ], "type": "string" }, "type": "array" }, "expectedPolicyToken": { "pattern": "^[a-f0-9]{64}$", "type": "string" }, "expectedRevision": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": ["expectedRevision", "expectedPolicyToken", "capabilities"], "type": "object" } } }, "description": "Body" }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "effective": { "items": { "type": "string" }, "type": "array" }, "id": { "minLength": 1, "type": "string" }, "mode": { "enum": ["tracks-default", "explicit"], "type": "string" }, "policyToken": { "pattern": "^[a-f0-9]{64}$", "type": "string" }, "revision": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "selectable": { "items": { "enum": [ "session.read", "finance.transactions.read", "finance.transactions.write", "finance.accounts.read", "purchases.read", "purchases.receipts.read", "purchases.receipts.write", "purchases.write", "purchases.edit", "inventory.read", "inventory.write", "barcode.read", "contacts.entities.read", "contacts.entities.write", "ego.chat", "ego.actions", "trips.read", "trips.capture.write", "trips.write", "documents.read", "documents.upload" ], "type": "string" }, "type": "array" }, "stored": { "items": { "type": "string" }, "type": "array" } }, "required": [ "id", "revision", "policyToken", "mode", "stored", "effective", "selectable" ], "type": "object" } } }, "description": "200" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBody" } } }, "description": "400" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBody" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBody" } } }, "description": "403" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBody" } } }, "description": "404" }, "409": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBody" } } }, "description": "409" } }, "summary": "Replace a complete explicit device capability selection using revision and policy CAS", "tags": ["operator"] } }, "/operator/pairing/codes": { "post": { "operationId": "operator.issuePairingCode", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } }, "description": "Body" }, "responses": { "201": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "code": { "type": "string" }, "expiresAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, "pairingUrl": { "format": "uri", "type": "string" } }, "required": ["code", "pairingUrl", "expiresAt"], "type": "object" } } }, "description": "201" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBody" } } }, "description": "401" }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBody" } } }, "description": "403" }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBody" } } }, "description": "429" }, "503": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBody" } } }, "description": "503" } }, "summary": "Mint a single-use pairing code. The plaintext is returned once and never again", "tags": ["operator"] } } } }