Skip to content

Latest commit

 

History

History
253 lines (144 loc) · 7.22 KB

OrdersApi.md

File metadata and controls

253 lines (144 loc) · 7.22 KB

\OrdersApi

All URIs are relative to https://api.phrase.com/v2

Method HTTP request Description
OrderConfirm Patch /projects/{project_id}/orders/{id}/confirm Confirm an order
OrderCreate Post /projects/{project_id}/orders Create a new order
OrderDelete Delete /projects/{project_id}/orders/{id} Cancel an order
OrderShow Get /projects/{project_id}/orders/{id} Get a single order
OrdersList Get /projects/{project_id}/orders List orders

OrderConfirm

TranslationOrder OrderConfirm(ctx, projectId, id, orderConfirmParameters, optional)

Confirm an order

Confirm an existing order and send it to the provider for translation. Same constraints as for create.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string Project ID
id string ID
orderConfirmParameters OrderConfirmParameters
optional *OrderConfirmOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a OrderConfirmOpts struct

Name Type Description Notes

xPhraseAppOTP | optional.String| Two-Factor-Authentication token (optional) |

Return type

TranslationOrder

Authorization

Basic, Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

OrderCreate

TranslationOrder OrderCreate(ctx, projectId, orderCreateParameters, optional)

Create a new order

Create a new order. Access token scope must include orders.create.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string Project ID
orderCreateParameters OrderCreateParameters
optional *OrderCreateOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a OrderCreateOpts struct

Name Type Description Notes

xPhraseAppOTP | optional.String| Two-Factor-Authentication token (optional) |

Return type

TranslationOrder

Authorization

Basic, Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

OrderDelete

OrderDelete(ctx, projectId, id, optional)

Cancel an order

Cancel an existing order. Must not yet be confirmed.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string Project ID
id string ID
optional *OrderDeleteOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a OrderDeleteOpts struct

Name Type Description Notes

xPhraseAppOTP | optional.String| Two-Factor-Authentication token (optional) | branch | optional.String| specify the branch to use |

Return type

(empty response body)

Authorization

Basic, Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

OrderShow

TranslationOrder OrderShow(ctx, projectId, id, optional)

Get a single order

Get details on a single order.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string Project ID
id string ID
optional *OrderShowOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a OrderShowOpts struct

Name Type Description Notes

xPhraseAppOTP | optional.String| Two-Factor-Authentication token (optional) | branch | optional.String| specify the branch to use |

Return type

TranslationOrder

Authorization

Basic, Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

OrdersList

[]TranslationOrder OrdersList(ctx, projectId, optional)

List orders

List all orders for the given project.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string Project ID
optional *OrdersListOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a OrdersListOpts struct

Name Type Description Notes

xPhraseAppOTP | optional.String| Two-Factor-Authentication token (optional) | page | optional.Int32| Page number | perPage | optional.Int32| Limit on the number of objects to be returned, between 1 and 100. 25 by default | branch | optional.String| specify the branch to use |

Return type

[]TranslationOrder

Authorization

Basic, Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]