{ "openapi": "3.1.0", "info": { "title": "Surface Internal API", "version": "20260702.113609", "description": "Service-to-service product catalogue & entitlements" }, "components": { "schemas": {} }, "paths": { "/v1/internal/customer/{customerId}/product": { "get": { "summary": "List a customer's product entitlements", "tags": [ "CustomerProduct" ], "parameters": [ { "schema": { "type": "string" }, "in": "query", "name": "statuses", "required": false, "description": "comma-separated list of: enabled, disabled" }, { "schema": { "type": "string" }, "in": "path", "name": "customerId", "required": true } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "required": [ "items" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "productId", "status" ], "properties": { "productId": { "anyOf": [ { "type": "string", "enum": [ "accounting" ] }, { "type": "string", "enum": [ "advertisingAgent" ] }, { "type": "string", "enum": [ "billPay" ] }, { "type": "string", "enum": [ "billPayCashAdvance" ] }, { "type": "string", "enum": [ "card" ] }, { "type": "string", "enum": [ "cashAdvance" ] }, { "type": "string", "enum": [ "expense" ] }, { "type": "string", "enum": [ "shippingAgent" ] } ] }, "status": { "anyOf": [ { "type": "string", "enum": [ "enabled" ] }, { "type": "string", "enum": [ "disabled" ] } ] } } } } } } } } }, "400": { "description": "Default Response", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "enum": [ "invalidRequest" ] }, "message": { "type": "string" } }, "title": "invalidRequest", "description": "A service error has occurred" }, { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "required": [ "path", "message" ], "properties": { "path": { "type": "string" }, "message": { "type": "string" } } } } } } ] } } } }, "401": { "description": "The access to this resource has been denied", "content": { "application/json": { "schema": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "enum": [ "unauthorized" ] }, "message": { "type": "string" } }, "title": "unauthorized", "description": "The access to this resource has been denied" } } } }, "403": { "description": "The access to this resource is forbidden", "content": { "application/json": { "schema": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "enum": [ "forbidden" ] }, "message": { "type": "string" } }, "title": "forbidden", "description": "The access to this resource is forbidden" } } } }, "default": { "description": "Catch-all error response for any unexpected internal errors", "content": { "application/json": { "schema": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "enum": [ "internal" ] }, "message": { "type": "string", "enum": [ "An unexpected internal error has occurred" ] } }, "title": "internal", "description": "Catch-all error response for any unexpected internal errors" } } } } } } }, "/v1/internal/product": { "get": { "summary": "List products (catalogue)", "tags": [ "Product" ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "required": [ "items" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "customerAccess", "newCustomerStatus", "updatedAt" ], "properties": { "id": { "anyOf": [ { "type": "string", "enum": [ "accounting" ] }, { "type": "string", "enum": [ "advertisingAgent" ] }, { "type": "string", "enum": [ "billPay" ] }, { "type": "string", "enum": [ "billPayCashAdvance" ] }, { "type": "string", "enum": [ "card" ] }, { "type": "string", "enum": [ "cashAdvance" ] }, { "type": "string", "enum": [ "expense" ] }, { "type": "string", "enum": [ "shippingAgent" ] } ] }, "customerAccess": { "anyOf": [ { "type": "string", "enum": [ "read" ] }, { "type": "string", "enum": [ "write" ] } ] }, "newCustomerStatus": { "anyOf": [ { "type": "string", "enum": [ "enabled" ] }, { "type": "string", "enum": [ "disabled" ] } ] }, "updatedAt": { "type": "string", "format": "date-time" } } } } } } } } }, "400": { "description": "Default Response", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "enum": [ "invalidRequest" ] }, "message": { "type": "string" } }, "title": "invalidRequest", "description": "A service error has occurred" }, { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "required": [ "path", "message" ], "properties": { "path": { "type": "string" }, "message": { "type": "string" } } } } } } ] } } } }, "401": { "description": "The access to this resource has been denied", "content": { "application/json": { "schema": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "enum": [ "unauthorized" ] }, "message": { "type": "string" } }, "title": "unauthorized", "description": "The access to this resource has been denied" } } } }, "403": { "description": "The access to this resource is forbidden", "content": { "application/json": { "schema": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "enum": [ "forbidden" ] }, "message": { "type": "string" } }, "title": "forbidden", "description": "The access to this resource is forbidden" } } } }, "default": { "description": "Catch-all error response for any unexpected internal errors", "content": { "application/json": { "schema": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "enum": [ "internal" ] }, "message": { "type": "string", "enum": [ "An unexpected internal error has occurred" ] } }, "title": "internal", "description": "Catch-all error response for any unexpected internal errors" } } } } } } }, "/v1/internal/product/{id}": { "get": { "summary": "Get product", "tags": [ "Product" ], "parameters": [ { "schema": { "anyOf": [ { "type": "string", "enum": [ "accounting" ] }, { "type": "string", "enum": [ "advertisingAgent" ] }, { "type": "string", "enum": [ "billPay" ] }, { "type": "string", "enum": [ "billPayCashAdvance" ] }, { "type": "string", "enum": [ "card" ] }, { "type": "string", "enum": [ "cashAdvance" ] }, { "type": "string", "enum": [ "expense" ] }, { "type": "string", "enum": [ "shippingAgent" ] } ] }, "in": "path", "name": "id", "required": true } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "customerAccess", "newCustomerStatus", "updatedAt" ], "properties": { "id": { "anyOf": [ { "type": "string", "enum": [ "accounting" ] }, { "type": "string", "enum": [ "advertisingAgent" ] }, { "type": "string", "enum": [ "billPay" ] }, { "type": "string", "enum": [ "billPayCashAdvance" ] }, { "type": "string", "enum": [ "card" ] }, { "type": "string", "enum": [ "cashAdvance" ] }, { "type": "string", "enum": [ "expense" ] }, { "type": "string", "enum": [ "shippingAgent" ] } ] }, "customerAccess": { "anyOf": [ { "type": "string", "enum": [ "read" ] }, { "type": "string", "enum": [ "write" ] } ] }, "newCustomerStatus": { "anyOf": [ { "type": "string", "enum": [ "enabled" ] }, { "type": "string", "enum": [ "disabled" ] } ] }, "updatedAt": { "type": "string", "format": "date-time" } } } } } }, "400": { "description": "Default Response", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "enum": [ "invalidRequest" ] }, "message": { "type": "string" } }, "title": "invalidRequest", "description": "A service error has occurred" }, { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "required": [ "path", "message" ], "properties": { "path": { "type": "string" }, "message": { "type": "string" } } } } } } ] } } } }, "401": { "description": "The access to this resource has been denied", "content": { "application/json": { "schema": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "enum": [ "unauthorized" ] }, "message": { "type": "string" } }, "title": "unauthorized", "description": "The access to this resource has been denied" } } } }, "403": { "description": "The access to this resource is forbidden", "content": { "application/json": { "schema": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "enum": [ "forbidden" ] }, "message": { "type": "string" } }, "title": "forbidden", "description": "The access to this resource is forbidden" } } } }, "404": { "description": "The resource was not found", "content": { "application/json": { "schema": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "enum": [ "notFound" ] }, "message": { "type": "string" } }, "title": "notFound", "description": "The resource was not found" } } } }, "default": { "description": "Catch-all error response for any unexpected internal errors", "content": { "application/json": { "schema": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "enum": [ "internal" ] }, "message": { "type": "string", "enum": [ "An unexpected internal error has occurred" ] } }, "title": "internal", "description": "Catch-all error response for any unexpected internal errors" } } } } } } } } }