Order App Definition

Metadata Definition

Id
required
string <uuid>

The id for this integration

Name
required
string

The name of this integration

required
object

The specification for authorizing with this order source

required
Array of objects non-empty unique

A list of branded order sources associated with this integration

OAuth

Learn More about defining an OAuth AuthProcess here

TypeScript Example

definition/index.tsdefinition/brand.tsforms/connect.ts
Copy
Copied
import { 
  AuthenticationType,
  OrderSourceAppMetadata
} from "@shipengine/connect-order-source-api";
import { brand } from "./brand.ts";

export const Metadata: OrderSourceAppMetadata = {
    Id: "79f8480f-9cec-4c51-bb3d-4887f37eba94",
    Name: "connect-example",
    AuthProcess: {
        Identifier: {
            AuthenticationType: AuthenticationType.Basic,
            IsSandbox: false
        }
    },
    OrderSources: [brand]
};
Copy
Copied
import { join } from "path";
import { OrderSourceDefinition } from "@shipengine/connect-order-source-api";
import { ConnectionFormSchema } from "../forms/connect.ts";

export const brand: OrderSourceDefinition = {
    Id: "6387c1d0-6b3a-4fd8-999f-390ded5f3d35",
    Name: "connect-example",
    SendEmail: false,
    CanConfigureTimeZone: false,
    CanLeaveFeedback: false,
    HasCustomMappings: false,
    HasCustomStatuses: false,
    HasInventoryLevels: false,
    CanRefresh: true,
    CanConfirmShipments: true,
    AccountConnection: {
        Name: "connect-example Connection",
        ConnectionFormSchema
    },
    Images: {
        Logo: join(__dirname, "../../assets/logo.svg"),
        Icon: join(__dirname, "../../assets/icon.svg"),
    }
};
Copy
Copied
export const ConnectionFormSchema = {
    JsonSchema: {
        "type": "object",
        "required": [
            "username",
            "password"
        ],
        "properties": {
            "username": {
                "type": "string",
                "title": "User Name:"
            },
            "password": {
                "type": "string",
                "title": "Password:"
            }
        }
    },
    UiSchema: {
        "password": {
            "ui:widget": "password",
            "ui:help": "Hint: Make it strong!"
        }
    }
};