GX Technology : APIs - Internal - Product

Add Product

POST /axis/products/v1/add

Adds a product to the Axis system

Request Body Parameters

NameTypeRequiredDescription
keystringyesThe unique key identifying this product
namestringyesThe name of this product
iconUrlstringyesThe URL of the product's icon
enabledbooleanyesFlag indicating if the product is enabled or not
settingsmap (string -> string) A map of setting name to setting value
languagesstring arrayyesAn array of ISO 639-1  language codes of languages the product supports

Response

HTTP 200

Indicates the product was created. Returned body is the same as Get Product.

HTTP 400

Indicates that the request contained invalid data

HTTP 401

Indicates the user is not logged in

HTTP 403

Indicates the user is logged in but not permitted to add products to the system.

HTTP 500

Indicates an internal server error has occurred.

Edit Product

PUT /axis/products/v1/{product}

Updates a product in the Axis system

Request URL Parameters

NameTypeDescription
productstringThe unique product

Request Body Parameters

NameTypeRequiredDescription
keystringyesThe unique key identifying this product
namestringyesThe name of this product
iconUrlstringyesThe URL of the product's icon
enabledbooleanyesFlag indicating if the product is enabled or not
settingsmap (string -> string) A map of setting name to setting value
languagesstring arrayyesAn array of ISO 639-1  language codes of languages the product supports

Response

HTTP 200

Indicates the product was updated. Returned body is the same as Get Product.

HTTP 400

Indicates that the request contained invalid data

HTTP 401

Indicates the user is not logged in

HTTP 403

Indicates the user is logged in but not permitted to edit products in the system.

HTTP 500

Indicates an internal server error has occurred.

Get Product

GET /axis/products/v1/products/{product}

Returns the details of a specific product.

Request URL Parameters

NameTypeDescription
productstringThe unique key identifying the product

Response

HTTP 200

Indicates the request was successful. The result set contains a single product.

{
	"success": true,
	"message": null,
	"product": {
		// ... see Product in the Models section below
	}
}

 

The data model for product listings is as follows

NameTypeRequiredDescription
successbooleantrueTrue if the API call was successful
messagestringfalseAn optional message
productsProduct arraytrueThe available products

 

HTTP 401

Indicates the user is not logged in

{
	"success": false,
	"message": "You are not permitted to perform this action",
	"errorId": "4aa089ed-4d45-4096-a55c-a2f694363ae5",
	"code": 4,
	"name": "SECURITY.NOT_AUTHORIZED"
}
HTTP 403

Indicates the user is logged in but not permitted to access product details.

HTTP 404

Indicates the product requested cannot be found

HTTP 500

Indicates an internal server error has occurred.

Get Products

GET /axis/products/v1/products/all

Returns all products that are available to the user.

Response

HTTP 200

Indicates the request was successful. The result set contains a list of products the user is permitted to use.

{
	"success": true,
	"message": null,
	"product": {
		// ... see Product in the Models section below
	}
}
HTTP 401

Indicates the user is not logged in

{
	"success": false,
	"message": "You are not permitted to perform this action",
	"errorId": "4aa089ed-4d45-4096-a55c-a2f694363ae5",
	"code": 4,
	"name": "SECURITY.NOT_AUTHORIZED"
}
HTTP 403

Indicates the user is logged in but not permitted to access product details.

HTTP 500

Indicates an internal server error has occurred.

 

 

 

 

 

 

 

 

Models

Product

NameTypeRequiredDescription
keystringyesThe unique key for this product
namestringyesThe name of this product
iconUrlstringyesThe URL for the product's icon
enabledbooleanyesTrue if enabled, false otherwise
settingsmap (string -> string)noProduct settings (supplied for admin pages only)
languagesstring arrayyesAn array of ISO 639-1 language codes of languages the product supports
capabilitiesmap (string -> Product Capabilities)yes

Product capabilities

Example (JSON)
{
	"key": "infinityonline",
	"name": "Infinity Online",
	"iconUrl": "assets/images/logos/infinity.jpg",
	"enabled": true,
	"settings": null,
	"languages": ["de", "pt", "fr", "en", "es"],
	"capabilities": {
		"newsletters": {
			"label": "Newsletter",
			"displayable": true,
			"searches": null,
			"fields": null
		},
		"account": {
			"label": "Account",
			"displayable": true,
			"searches": {
				"postalcode": "Postal Code",
				"username": "Username",
				"email": "Email",
				"birthdate": "Birthdate",
				"lastname": "Last Name",
				"firstname": "First Name",
				"general": "Smart Search"
			},
			"fields": {
				"accountId": {
					"type": "STRING",
					"label": "Account ID",
					"editable": false,
					"displayable": true
				},
				"username": {
					"type": "STRING",
					"label": "Username",
					"editable": false,
					"displayable": true
				},
				"status": {
					"type": "DROPDOWN",
					"label": "Status",
					"editable": true,
					"displayable": true,
					"options": {
						"ANONYMIZED": "Anonymized",
						"NOTACTIVATED": "Not Activated",
						"ACTIVATED": "Activated",
						"DELETED": "Deleted"
					}
				},
				"ageBand": {
					"type": "DROPDOWN",
					"label": "Age Band",
					"editable": false,
					"displayable": true,
					"options": {
						"CHILD": "Child",
						"TEEN": "Teen",
						"ADULT": "Adult",
						"UNKNOWN": "Unknown"
					}
				},
				"displayName": {
					"type": "OBJECT",
					"label": "Display Name",
					"editable": true,
					"displayable": true,
					"fields": {
						"status": {
							"type": "DROPDOWN",
							"label": "Display Name Status",
							"editable": true,
							"displayable": true,
							"options": {
								"UNKNOWN": "Unknown",
								"PENDING": "Pending",
								"ACCEPTED": "Accepted",
								"REJECTED": "Rejected",
								"REPORTED": "Reported"
							}
						},
						"name": {
							"type": "STRING",
							"label": "Display Name",
							"editable": true,
							"displayable": true
						}
					}
				},
				"email": {
					"type": "EMAIL",
					"label": "Email",
					"editable": true,
					"displayable": true
				},
				"parentEmail": {
					"type": "EMAIL",
					"label": "Parent Email",
					"editable": true,
					"displayable": true
				},
				"firstName": {
					"type": "STRING",
					"label": "First Name",
					"editable": true,
					"displayable": true
				},
				"lastName": {
					"type": "STRING",
					"label": "Last Name",
					"editable": true,
					"displayable": true
				},
				"gender": {
					"type": "DROPDOWN",
					"label": "Gender",
					"editable": true,
					"displayable": true,
					"options": {
						"UNKNOWN": "Unknown ",
						"MALE": "Male",
						"FEMALE": "Female",
						"NA": "Not Applicable"
					}
				},
				"birthDate": {
					"type": "DATE",
					"label": "Birth Date",
					"editable": true,
					"displayable": true
				},
				"joinDate": {
					"type": "DATE",
					"label": "Join Date",
					"editable": false,
					"displayable": true
				},
				"language": {
					"type": "DROPDOWN",
					"label": "Language ",
					"editable": true,
					"displayable": true,
					"options": {
						"EN": "English",
						"ES": "Spanish",
						"FR": "French",
						"PT": "Portuguese"
						// etc ...
					}
				},
				"country": {
					"type": "DROPDOWN",
					"label": "Country",
					"editable": true,
					"displayable": true,
					"options": {
						"BR": "Brazil",
						"CA": "Canada",
						"GB": "United Kingdom of Great Britain and Northern Ireland",
						"JP": "Japan",
						"MX": "Mexico",
						"US": "United States of America"
						// etc ...
					}
				},
				"isSafetyRestricted": {
					"type": "BOOLEAN",
					"label": "Safety Restricted",
					"editable": false,
					"displayable": true
				},
				"addresses": {
					"type": "ADDRESS",
					"label": "Addresses",
					"editable": true,
					"displayable": true,
					"fields": {
						"region": {
							"type": "STRING",
							"label": "Region",
							"editable": false,
							"displayable": false
						},
						"isPrimary": {
							"type": "BOOLEAN",
							"label": "Is Primary",
							"editable": true,
							"displayable": true
						},
						"postalCode": {
							"type": "STRING",
							"label": "Postal Code",
							"editable": false,
							"displayable": false
						},
						"line1": {
							"type": "STRING",
							"label": "Line 1",
							"editable": true,
							"displayable": true
						},
						"type": {
							"type": "DROPDOWN",
							"label": "Address Type",
							"editable": true,
							"displayable": true,
							"options": {
								"BILLING": "Billing",
								"HOME": "Home",
								"OTHER": "Other",
								"SCHOOL": "School",
								"SHIPPING": "Shipping",
								"WORK": "Work"
							}
						},
						"addressId": {
							"type": "STRING",
							"label": "Address ID",
							"editable": false,
							"displayable": false
						},
						"country": {
							"type": "DROPDOWN",
							"label": "Country",
							"editable": false,
							"displayable": false,
							"options": {
								"BR": "Brazil",
								"CA": "Canada",
								"GB": "United Kingdom of Great Britain and Northern Ireland",
								"JP": "Japan",
								"MX": "Mexico",
								"US": "United States of America"
								// etc ...
							}
						},
						"city": {
							"type": "STRING",
							"label": "City",
							"editable": false,
							"displayable": false
						},
						"line2": {
							"type": "STRING",
							"label": "Line 2",
							"editable": false,
							"displayable": false
						}
					}
				},
				"phones": {
					"type": "PHONE",
					"label": "Phone Numbers",
					"editable": true,
					"displayable": true,
					"fields": {
						"extension": {
							"type": "STRING",
							"label": "Extension",
							"editable": true,
							"displayable": true
						},
						"phoneNumberId": {
							"type": "STRING",
							"label": "Phone Number ID",
							"editable": false,
							"displayable": false
						},
						"isPrimary": {
							"type": "BOOLEAN",
							"label": "Is Primary",
							"editable": true,
							"displayable": true
						},
						"countryCode": {
							"type": "STRING",
							"label": "Phone Number Country Code",
							"editable": true,
							"displayable": true
						},
						"number": {
							"type": "STRING",
							"label": "Phone Number",
							"editable": true,
							"displayable": true
						},
						"type": {
							"type": "DROPDOWN",
							"label": "Phone Number Type",
							"editable": true,
							"displayable": true,
							"options": {
								"DAYTIME": "Daytime",
								"EVENING": "Evening",
								"FAX": "Fax",
								"MOBILE": "Mobile",
								"OTHER": "Other",
								"UNKNOWN": "Unknown"
							}
						}
					}
				},
				"links": {
					"type": "OBJECT",
					"label": "Links",
					"editable": false,
					"displayable": true,
					"fields": {
						"login": {
							"type": "URL",
							"label": "Login as Guest",
							"editable": false,
							"displayable": false,
							"target": "_blank"
						},
						"password": {
							"type": "ACTIONBUTTON",
							"label": "Reset Password",
							"editable": false,
							"displayable": true,
							"method": "POST"
						}
					}
				}
			}
		},{
			// More tabs
		}
	}
}

Product Capabilities

NameTypeRequiredDescription
labelstringyesThe localized string to be used as a label for the tab defined by these capabilities
displayablestringyesTrue if the tab is displayable, false otherwise
searchesmap (string -> string)noA mapping of search key to localized label. Required for accounts tab.
fieldsmap (string -> Dynamic Data Field)noA mapping of field name to Dynamic Data Field