Skip to content

Custom Fields: External ID support (AG-1605) #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 84 additions & 16 deletions openapi/platform/platform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1281,6 +1281,19 @@ paths:
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
Expand Down Expand Up @@ -2473,6 +2486,19 @@ paths:
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
type: salesAccountCustomFields
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
Expand Down Expand Up @@ -2731,6 +2757,19 @@ paths:
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: U-12345678-abcd-1234-abcd-123456789abd
type: userCustomFields
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
Expand Down Expand Up @@ -2902,6 +2941,19 @@ paths:
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: ABC-MP-1234567890ABCDEFGHIJKLMNOPQRSTUV
type: productCustomFields
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
Expand Down Expand Up @@ -3644,6 +3696,9 @@ components:

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:
Expand Down Expand Up @@ -3764,7 +3819,10 @@ components:
properties:
fieldId:
type: string
description: 'Field identifier, can be retrived by listing the attributes'
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
Expand Down Expand Up @@ -3821,14 +3879,12 @@ components:
readOnly: true
title:
type: string
description: 'The main label for the field, appering in most user interfaces that show the value. This field is not read when setting a value.'
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 explaination of the field, it optionally appears in the UI. This field is not read when setting a value.'
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:
- fieldId
required:
- id
- type
Expand Down Expand Up @@ -4481,7 +4537,7 @@ components:
properties:
id:
type: string
description: 'ID of custom fields, can be retrived using custom fields endpoint'
description: 'ID of custom fields, can be retrieved using custom fields endpoint'
type:
type: string
example: customFields
Expand Down Expand Up @@ -4555,6 +4611,9 @@ components:

Custom fields associated with a sales account. 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:
Expand Down Expand Up @@ -4672,7 +4731,10 @@ components:
properties:
fieldId:
type: string
description: 'Field identifier, can be retrived by listing the attributes'
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
Expand Down Expand Up @@ -4725,14 +4787,12 @@ components:
readOnly: true
title:
type: string
description: 'The main label for the field, appering in most user interfaces that show the value. This field is not read when setting a value.'
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 explaination of the field, it optionally appears in the UI. This field is not read when setting a value.'
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:
- fieldId
required:
- id
- type
Expand All @@ -4746,6 +4806,9 @@ components:

Custom fields associated with a user. 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:
Expand Down Expand Up @@ -4863,7 +4926,10 @@ components:
properties:
fieldId:
type: string
description: 'Field identifier, can be retrived by listing the attributes'
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
Expand Down Expand Up @@ -4922,8 +4988,6 @@ components:
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:
- fieldId
required:
- id
- type
Expand All @@ -4937,6 +5001,9 @@ components:

Custom fields associated with a product. These attributes can be managed at Partner Center -> Administration -> Data attributes.

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 values and the currency code are also configured in the Administration panel.
x-tags:
- Product Custom Fields
Expand Down Expand Up @@ -4971,6 +5038,9 @@ components:
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
Expand Down Expand Up @@ -5029,8 +5099,6 @@ components:
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:
- fieldId
required:
- id
- type
Expand Down