Jump to content
  • 0

How do you place an order via the API?


will

Question

How does one place an order just by interacting with the API rather than the order form? I'd like to replicate all the actions that would occur when using the order form.

New users can be created with the User model, but what needs to be done to ensure that a new service is created and invoiced? A new service could be created via Services->Add. This can even notify the user that the service has been created. Will it create the initial invoice as well, and activate the service once that invoice has been paid, or does the order plugin need to be used for all of that to happen?

The order plugin has models available that aren't documented at http://source-docs.blesta.com/package-blesta.app.models.html (presumably because they are plugin models rather than base Blesta models)

It looks like the "add" function in plugins/order/models/order_orders.php may be what I'm looking for - is that all I need to call, or is there some additional work that needs to be done to complete this process?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

I'm no expect sadly so the guys will be able to help you later on today, but I think you need the services part to add the service after the user has been created or if it's already exists: http://source-docs.blesta.com/class-Services.html But Paul, Tyson or Jono or even PauloV and Naja7host will be able to help more :blesta: 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...