Create Sales Target

Beta
POST/v1/sales/account-users/{id}/sales-targets

Idempotent with Idempotency-Key header. Learn more

Creates a revenue goal for a sales rep covering a given period.

The sales rep must be an active account user in your account, otherwise the request returns a not-found error. Periods are not checked for overlap, so a rep can hold several targets covering the same dates; use the upsert endpoint to change an existing target rather than adding another.

Permissions requiredValues:sales_targets:create
The role behind your API key or agent must grant every one of these permissions.
idstring

The account user (sales rep) the target is for.

Must be an active account user in your account.

start_datestring (date-time)

Start of the period the target applies to (inclusive).

end_datestring (date-time)

End of the period the target applies to.

amount_valuestring

The revenue goal for the period, as a decimal string (e.g. 50000.00).

amount_unit_idstring

The unit the goal is denominated in, typically a currency unit.

idstring

Sales target ID.

objectstringenumValues:sales_target

Resource type identifier.

start_atstring (date-time)

Start of the period this target applies to (inclusive).

end_atstring (date-time)

End of the period this target applies to (e.g. the close of a quarter).

sales_repusernullable

The sales rep this target is assigned to.

This is the rep's account-user record, identified by the same ID the /v1/identity/account-users endpoints return. Only the id is populated.

idstring

User ID.

objectstringenumValues:user

Resource type identifier.

emailstringnullable

Email address the user signs in with and receives platform email at.

namestringnullable

User's full display name.

usernamestringnullable

Username the user can sign in with instead of their email address.

Usernames are unique across the whole platform, not just within your account.

email_verified_atstring (date-time)nullable

When the user verified their email address.

image_urlstringnullable

Location of the user's profile image.

For photos uploaded through the API this holds an internal path rather than a fetchable image URL; call Get User Photo URL to obtain a temporary link to the image itself.

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

amountquantitynullable

The revenue goal for the period, as a monetary quantity.

idstring

Quantity ID.

objectstringenumValues:quantity

Resource type identifier.

valuestring (decimal)

Raw decimal value of the quantity, as a string to preserve precision.

This is the unformatted machine value; see display_value for the human-readable rendering with unit and thousands separators.

display_valuestring

Formatted value with unit abbreviation (e.g. "$1,234.56" or "100 kg").

unitunitnullable

Unit of measure for this value (e.g. a currency, mass, or count unit).

idstring

Unit ID.

objectstringenumValues:unit

Resource type identifier.

namestring

Display name of the unit (e.g. "Gram", "Kilogram").

abbreviationstring

Short abbreviation for the unit (e.g. "g", "kg").

typestringenumValues:currencyquantitytime

The dimension this unit measures, such as mass, volume, or currency.

A unit can only be converted to another unit of the same dimension. The quantity dimension is for discrete countable items rather than a physical measure.

ratio_numeratorstring (decimal)

Numerator of the ratio that converts a quantity in this unit into the dimension's base unit.

A quantity is converted with value × (ratio_numerator / ratio_denominator) + (offset_numerator / offset_denominator), so a kilogram in a gram-based dimension has a numerator of 1000 and a denominator of 1.

ratio_denominatorstring (decimal)

Denominator of the ratio that converts a quantity in this unit into the dimension's base unit.

Cannot be zero.

offset_numeratorstring (decimal)

Numerator of the conversion offset, applied after the ratio for scales that do not share a zero point, such as temperature.

Zero for units that convert by ratio alone.

offset_denominatorstring (decimal)

Denominator of the conversion offset applied after the ratio.

Never zero; a unit with no offset carries a numerator of 0 over a denominator of 1.

is_base_unitboolean

Whether this is the base unit for its dimension.

Every other unit's conversion ratio is expressed relative to the base unit. Base units are platform-defined; units created through the API are never base units.

ownerownernullable

Owner of this resource.

objectstringenumValues:owner

Resource type identifier.

typestringenumValues:systemaccount

Where this resource came from.

  • system: a platform-provided default shared across all accounts; not editable.
  • account: created and owned by a specific account; the account field identifies which.
accountaccountnullable

The account that owns this resource.

Present only when type is account; system-owned resources have no owning account.

idstring

Account ID.

objectstringenumValues:account

Resource type identifier.

namestring

The account's display name.

default_billing_addressaddressnullable

The address billed by default on orders for this account.

idstring

Address ID.

objectstringenumValues:address

Resource type identifier.

namestring

Display name of the address.

phonestringnullable

Phone number associated with the address.

emailstringnullable

Email address associated with the address.

typestringenumValues:standarddrop_ship

How the address is used.

  • standard: a normal shipping or billing address.
  • drop_ship: an address an order is shipped to directly, typically a third party or end customer rather than the account itself.
geolocationgeolocationnullable

Street-level location details for the address.

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

default_shipping_addressaddressnullable

The address shipped to by default on orders for this account.

idstring

Address ID.

objectstringenumValues:address

Resource type identifier.

namestring

Display name of the address.

phonestringnullable

Phone number associated with the address.

emailstringnullable

Email address associated with the address.

typestringenumValues:standarddrop_ship

How the address is used.

  • standard: a normal shipping or billing address.
  • drop_ship: an address an order is shipped to directly, typically a third party or end customer rather than the account itself.
geolocationgeolocationnullable

Street-level location details for the address.

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

brandingaccount_brandingnullable

Customer-facing branding for the account, such as the logo, support contacts, and social links.

idstring

Branding ID.

objectstringenumValues:account_branding

Resource type identifier.

support_emailstringnullable

The email address customers are directed to for support.

phone_numberstringnullable

The account's public contact phone number.

logo_urlstringnullable

Stored location of the account's logo image.

Logos uploaded through the API are stored as an object key rather than a fetchable link, so use the Get Account Logo URL endpoint to obtain a short-lived download URL.

favicon_urlstringnullable

Stored location of the account's customer-portal favicon.

Favicons uploaded through the API are stored as an object key rather than a fetchable link, so use the Get Account Favicon URL endpoint to obtain a short-lived download URL.

facebook_handlestringnullable

Facebook handle.

instagram_handlestringnullable

Instagram handle.

linkedin_handlestringnullable

LinkedIn handle.

twitter_handlestringnullable

Twitter handle.

website_urlstringnullable

The account's public website.

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

portalaccount_portalnullable

The account's customer portal settings, including the portal URL slug.

idstring

Portal ID.

objectstringenumValues:account_portal

Resource type identifier.

slugstring

URL slug that identifies the account's customer portal.

Unique across all accounts.

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

created_atstring (date-time)

When this unit was created.

updated_atstring (date-time)

When this unit was last updated.

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

Responses

201

Successful response for Create Sales Target