openapi: 3.2.0 info: title: Platform REST Order Custom Fields API version: Evergreen servers: - url: https://prod.apigateway.co/platform description: Production - description: Demo url: https://demo.apigateway.co/platform - description: Local url: '{local}/platform' - url: http://localhost:11001/platform description: Localhost tags: - name: Order Custom Fields paths: /orderCustomFields/{id}: parameters: - schema: type: string name: id in: path required: true example: AG-1231231:ORD-1234567 description: The ID of the Custom Fields - actually the same id of the Sales Order patch: summary: Update Custom Fields operationId: patch-orderCustomFields-by-id requestBody: content: application/vnd.api+json: schema: type: object properties: data: $ref: '#/components/schemas/orderCustomFields' required: - data examples: Example with String, Date and Integer: value: data: id: AG-1231231:ORD-1234567 type: orderCustomFields attributes: partnerFields: - fieldID: FieldID-123448ca-abc0-abc5-abc2-abc640bf4b99 integerValue: 1000 - fieldID: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99 dateValue: A good date value - fieldID: FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99 stringValue: A good string value Example some fields using externalId instead of fieldId: value: data: id: AG-1231231:ORD-1234567 type: orderCustomFields attributes: partnerFields: - externalId: days-active integerValue: 1000 - fieldId: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99 dateValue: A good date value - externalId: custom-nickname stringValue: A good string value responses: '200': description: OK content: application/vnd.api+json: schema: type: object properties: data: $ref: '#/components/schemas/orderCustomFields' examples: Return Example: value: data: id: AG-1231231:ORD-1234567 type: orderCustomFields attributes: partnerFields: - fieldID: FieldID-123448ca-abc0-abc5-abc2-abc640bf4b99 integerValue: 1000 title: Title of 123448ca field description: Description for 123448ca field fieldType: integer - fieldID: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99 dateValue: A good date value title: Title of 987448ca field description: Description for 987448ca field fieldType: date - fieldID: FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99 stringValue: A good string value title: Title of abc448ca field description: Description for abc448ca field fieldType: string x-lifecycle: status: trustedTester description: '[Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester` Custom Fields are an additional information attached to an Order' parameters: - schema: type: string example: Bearer pattern: ^Bearer\s\S+ in: header name: Authorization description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details. required: true - schema: type: string default: application/vnd.api+json enum: - application/vnd.api+json in: header name: Content-Type required: true description: Indicates the format of the request body being sent. In most cases you will want `application/vnd.api+json` security: - OAuth2Demo: - order - OAuth2Prod: - order tags: - Order Custom Fields get: summary: Get Custom Fields by ID responses: '200': description: OK content: application/vnd.api+json: schema: type: object properties: data: $ref: '#/components/schemas/orderCustomFields' links: type: object properties: self: type: string format: uri first: type: string description: Provides a link back to the first page of results format: uri next: type: string description: The URI at which the next batch of fields can be gotten from format: uri examples: Return Example: value: data: id: AG-1231231:ORD-1234567 type: orderCustomFields attributes: partnerFields: - fieldID: FieldID-123448ca-abc0-abc5-abc2-abc640bf4b99 integerValue: 1000 title: Title of 123448ca field description: Description for 123448ca field fieldType: integer - fieldID: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99 dateValue: A good date value title: Title of 987448ca field description: Description for 987448ca field fieldType: date - fieldID: FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99 stringValue: A good string value title: Title of abc448ca field description: Description for abc448ca field fieldType: string operationId: get-orderCustomFields-by-id description: '[Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester` Returns custom fields about a sales order. Attributes can be set up at the partner administration page in Partner Center.' security: - OAuth2Demo: - order - OAuth2Prod: - order x-lifecycle: status: trustedTester tags: - Order Custom Fields parameters: - schema: type: string example: Bearer pattern: ^Bearer\s\S+ in: header name: Authorization description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details. options: summary: List valid HTTP verbs for /orderCustomFields/{id} operationId: options-orderCustomFields-by-id responses: '204': description: No Content description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. ' tags: - Order Custom Fields components: schemas: orderCustomFields: title: Order Custom Fields type: object x-lifecycle: status: trustedTester description: '[Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester` Custom fields associated with a sales order. The field definitions can be managed at Partner Center -> Administration -> Custom Fields. One form of identifier should be chosen, either `fieldId` or `externalId`. `fieldId` is the computer generated ID (like `FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99`) and `externalId` is a optional human-readable ID that can be set in the administration panel. Dropdown possible value and the currency code are also configured in the Administration panel.' x-examples: Custom Fields with string value Example: data: id: AG-1231231:ORD-1234567 type: orderCustomFields partnerFields: - fieldId: FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99 stringValue: A good string value title: Title of abc448ca field description: Description for abc448ca field fieldType: string Custom Fields with integer value Example: data: id: AG-1231231:ORD-1234567 type: orderCustomFields partnerFields: - fieldId: FieldID-123448ca-abc0-abc5-abc2-abc640bf4b99 integerValue: 1000 title: Title of 123448ca field description: Description for 123448ca field fieldType: integer Custom Fields with Date value Example: data: id: AG-1231231:ORD-1234567 type: orderCustomFields partnerFields: - fieldId: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99 dateValue: '2016-01-02T15:04:05Z' title: Title of 987448ca field description: Description for 987448ca field fieldType: date Custom Fields Full: data: id: AG-1231231:ORD-1234567 type: orderCustomFields partnerFields: - fieldId: FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99 stringValue: A good string value title: Title of abc448ca field description: Description for abc448ca field fieldType: string - fieldId: FieldID-123448ca-abc0-abc5-abc2-abc640bf4b99 integerValue: 1000 title: Title of 123448ca field description: Description for 123448ca field fieldType: integer - fieldId: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99 dateValue: '2022-01-02T15:04:05Z' title: Title of 987448ca field description: Description for 987448ca field fieldType: date - fieldId: FieldID-987448f2-abc0-abc5-abc2-abc640bf4b00 dropdownValue: red title: Title of 987448f2 field description: Description for 987448f2 field fieldType: dropdown - fieldId: FieldID-98744854-abc0-abc5-abc2-abc640bf4b01 currencyValue: 10000 title: Title of 98744854 field description: Description for 98744854 field fieldType: currency currencyCode: CAD Custom Fields with Dropdown Example: data: id: AG-1231231:ORD-1234567 type: orderCustomFields partnerFields: - fieldId: FieldID-987448f2-abc0-abc5-abc2-abc640bf4b00 dropdownValue: red title: Title of 987448f2 field description: Description for 987448f2 field fieldType: dropdown Custom Fields with Currency Example: data: id: AG-1231231:ORD-1234567 type: orderCustomFields partnerFields: - fieldId: FieldID-98744854-abc0-abc5-abc2-abc640bf4b01 currencyValue: 10000 title: Title of 98744854 field description: Description for 98744854 field fieldType: currency currencyCode: CAD x-tags: - Order Custom Fields properties: id: type: string example: AG-1231231:ORD-1234567 description: An identifier for the parent entity, for example order (AG-1231231:ORD-12345671) readOnly: true type: type: string default: orderCustomFields enum: - orderCustomFields description: Should always be orderCustomFields attributes: type: object properties: partnerFields: type: array description: 'List of custom fields specific to the partner with a direct relationship to the sales order. To send a new value each field must have at least the fieldId and its correspondent value. For example a field of type string must have the stringValue attribute filled. string -> stringValue integer -> integerValue date -> dateValue Only the fields that you wish to modify need to be sent.' items: type: object properties: fieldId: type: string description: Field identifier, can be retrieved by listing the attributes externalId: type: string description: Alternative field identifier, can be set on admin panel and can be retrieved by listing the attributes fieldType: type: string example: string enum: - string - integer - date - dropdown - currency description: "Indicates which of the value fields to use to read or write the data. It can only be modified from within partner center. \n\nstring -> stringValue\n\ninteger -> integerValue\n\ndate -> dateValue\n\ndropdown -> dropdownValue\n\ncurrency -> currencyValue" readOnly: true stringValue: type: string description: Required when the field type is `string` integerValue: type: integer description: Required when the field type is `integer` dateValue: type: string description: Required when the field type is `date` format: date dropdownValue: type: string description: Required when type is `dropdown`. The possible values can be discovered using the administration panel. currencyValue: type: integer description: 'Required when the field type is `currency`. This field represents the cents (or the smallest part of the currency). Example: USD 600.00 -> currencyValue=60000' currencyCode: type: string minLength: 3 maxLength: 3 description: 'Represents the type of currency when the field is type `currency`. It will be the 3 letter currency code as defined by [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) Ex: USD, CAD, AUD' example: USD readOnly: true title: type: string description: The main label for the field, appearing in most user interfaces that show the value. This field is not read when setting a value. readOnly: true description: type: string description: A longer text explanation of the field, it optionally appears in the UI. This field is not read when setting a value. readOnly: true required: - id - type securitySchemes: JWT: type: http scheme: bearer bearerFormat: JWT OAuth2Demo: type: oauth2 flows: authorizationCode: authorizationUrl: https://sso-api-demo.apigateway.co/oauth2/auth tokenUrl: https://sso-api-demo.apigateway.co/oauth2/token scopes: sales.contact: Read-write access to sales contact details business:read: Read only access to business details business: Read-write access to business details partner:read: Read-write access to details about your partner financial: Read-write access to financial details order: Read-write access to order details order:read: Read only access to order details user.profile:read: Read access to the profile fields of all categories of users user.contact:read: Read access to the contact info (email, phone, address) of all categories of users user.permission:read: Read access to the permission info (accessible locations, features and roles) of all categories of users user.permission: Read-write access to the permission info (accessible locations, features and roles) of all categories of users user.admin: Read-write access to manage all users user.list: '''Allows searching for users based on a set of filters. (ex: email, name, category, organization). Without this scope an exact user id is required.' self.user.admin: Allows editing the profile, contact info and profile image for the current user. self.user.contact:read: Read access to the contact info (email, phone, address) of the current user. openid: Allows getting the user id of the current user profile: Readonly access to the user profile, including name, locale, and language preferences. email: Allows readonly access to the email of the current user. phone: Allows readonly access to the phone numbers of the current user. address: Allows readonly access to the address of the current user. sales.account: Allows read-write access to account records sales.proposals: Allows read-write access to proposals product: Read access to the product details automation:read: Read only access to automations refreshUrl: '' OAuth2Prod: type: oauth2 flows: authorizationCode: authorizationUrl: https://sso-api-prod.apigateway.co/oauth2/auth tokenUrl: https://sso-api-prod.apigateway.co/oauth2/token scopes: sales.contact: Read-write access to sales contact details business:read: Read only access to business details business: Read-write access to business details partner:read: Read-write access to details about your partner financial: Read-write access to financial details order:read: Read only access to order details order: Read-write access to order details user.profile:read: Read access to the profile fields of all categories of users user.contact:read: Read access to the contact info (email, phone, address) of all categories of users user.permission:read: Read access to the permission info (accessible locations, features and roles) of all categories of users user.permission: Read-write access to the permission info (accessible locations, features and roles) of all categories of users user.admin: Read-write access to manage all users user.list: '''Allows searching for users based on a set of filters. (ex: email, name, category, organization). Without this scope an exact user id is required.' self.user.admin: Allows editing the profile, contact info and profile image for the current user. self.user.contact:read: Read access to the contact info (email, phone, address) of the current user. openid: Allows getting the user id of the current user profile: Readonly access to the user profile, including name, locale, and language preferences. email: Allows readonly access to the email of the current user. phone: Allows readonly access to the phone numbers of the current user. address: Allows readonly access to the address of the current user. sales.account: Allows read-write access to account records sales.proposals: Allows read-write access to proposals product: Read access to the product details automation:read: Read only access to automations refreshUrl: ''