@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api spec
@base https://api.ote-godaddy.com
@endpoints 5
@toc subscriptions(5)

@endpoint GET /v1/subscriptions
@desc Retrieve a list of Subscriptions for the specified Shopper
@required {X-App-Key: any # A unique application key identifying the source of the request. This is required for request tracking}
@optional {X-Shopper-Id: any # Shopper ID to return subscriptions for when not using JWT, X-Market-Id: any # The market that the response should be formatted for, productGroupKeys: any # Only return Subscriptions with the specified product groups, includes: any # Optional details to be included in the response, offset: any # Number of Subscriptions to skip before starting to return paged results (must be a multiple of the limit), limit: any # Number of Subscriptions to retrieve in this page, starting after offset, sort: any # Property name that will be used to sort results. "-" indicates descending}
@returns(200) Request was successful
@errors {400: Request was malformed, 401: Authentication info not sent or invalid, 403: Authenticated user is not allowed access, 422: Invalid query parameter (custom message returned for each parameter), 429: Too many requests received within interval, 500: Internal server error}

@endpoint GET /v1/subscriptions/productGroups
@desc Retrieve a list of ProductGroups for the specified Shopper
@required {X-App-Key: any # A unique application key identifying the source of the request. This is required for request tracking}
@optional {X-Shopper-Id: any # Shopper ID to return data for when not using JWT}
@returns(200) Request was successful
@errors {400: Request was malformed, 401: Authentication info not sent or invalid, 403: Authenticated user is not allowed access, 429: Too many requests received within interval, 500: Internal server error}

@endpoint DELETE /v1/subscriptions/{subscriptionId}
@desc Cancel the specified Subscription
@required {X-App-Key: any # A unique application key identifying the source of the request. This is required for request tracking, subscriptionId: any # Unique identifier of the Subscription to cancel}
@optional {X-Shopper-Id: any # Shopper ID to return data for when not using JWT}
@returns(204) Request was successful
@errors {400: Request was malformed, 401: Authentication info not sent or invalid, 403: Authenticated user is not allowed access, 404: Resource not found, 422: Failed to determine if the domain is protected (invalid domain ID)<br>Invalid Subscription Id<br>The Office 365 Subscription cannot be cancelled (shopper is migrating)<br>The Subscription cannot be cancelled<br>The Subscription cannot be cancelled (PFID is disabled for cancellation)<br>The Subscription cannot be cancelled (domain is protected)<br>The domain alert Subscription cannot be cancelled, 429: Too many requests received within interval, 500: Failed to determine if the Office 365 account is migrating<br>Failed to determine if the domain alert is cancellable<br>Failed to determine if the domain is protected<br>Internal server error, 504: Gateway timeout}

@endpoint GET /v1/subscriptions/{subscriptionId}
@desc Retrieve details for the specified Subscription
@required {X-App-Key: any # A unique application key identifying the source of the request. This is required for request tracking, subscriptionId: any # Unique identifier of the Subscription to retrieve}
@optional {X-Shopper-Id: any # Shopper ID to be operated on, if different from JWT}
@returns(200) Request was successful
@errors {400: Request was malformed, 401: Authentication info not sent or invalid, 403: Authenticated user is not allowed access, 404: Resource not found, 422: Invalid Subscription Id, 429: Too many requests received within interval, 500: Internal server error, 504: Gateway timeout}

@endpoint PATCH /v1/subscriptions/{subscriptionId}
@desc Update details for the specified Subscription
@required {X-App-Key: any # A unique application key identifying the source of the request. This is required for request tracking, subscriptionId: any # Unique identifier of the Subscription to update, subscription: any # Details of the Subscription to change}
@optional {X-Shopper-Id: any # Shopper ID to be operated on, if different from JWT}
@returns(204) Request was successful
@errors {400: Request was malformed, 401: Authentication info not sent or invalid, 403: Authenticated user is not allowed access <br> This method only supports JWT authentication, 404: Subscription not found <br> Payment profile not found, 500: Internal server error}

@end
