Jump to content

codym

Members
  • Content Count

    6
  • Joined

  • Last visited

  1. I actually just got it to work. Even though all of the vars[] are shown to be required in the docs, if it has a null value it is not to be sent in the request. Specifically, vars[date_last_renewed], vars[date_suspended], and vars[date_canceled] were all fields throwing the error I reported by passing null to them. Additionally, vars[coupon_id] and vars[parent_service_id] were also throwing errors due to null values after I fixed the others. The documentation should be updated to show which vars are actually optional and which are not. Lastly, the raw string is the correct format to be passed as a parameter. No quotes and no URI encoding.
  2. The data set I am passing is as follows: I have one error that exists in my directory, but I don't think it has anything to do with this issue as it is from days before:
  3. Thanks for your reply Tyson. I edited my above question to include examples of the DateTime value I am passing. In regards to: I am passing the date_added and date_renews as dates, and the other three date options as null. Surely those must not be defined as those actions have not happened on this service, which was newly created. Additionally, the services/get endpoint returns those three values as null so I don't believe those three are the issue.
  4. Hello, I'm working on the services/edit endpoint, in an attempt to add a configurable option to a clients' existing service. I am defining all of the following parameters as follows: parent_service_id = PSID package_group_id = PGID pricing_id = PricingID client_id = ClientID module_row_id = 1 coupon_id = null qty = 1 status = pending date_added = "2019-11-02 17:14:08" date_renews = "2019-12-02 18:14:08" date_last_renewed = null date_suspended = null date_canceled = null use_module = true configoptions = [currentConfigOptions, newConfigOption] I am using the services/get endpoint to retrieve the service by ID and then plugging those values directly into the edit endpoint, except for adding a single configurable option (which is my intended change). When sending the request, I get the following error: { "message": "An unexpected error occured.", "response": "DateTime::__construct(): Failed to parse time string (null) at position 0 (n): The timezone could not be found in the database" } I've taken the following steps to troubleshoot this: ensured the timezone is set in Blesta tried URL encoding the DateTime string that comes out of the get endpoint 2019-11-02%2017%3A14%3A08 passed DateTime string in quotes "2019-11-02%2017%3A14%3A08" passed null in DateTime null Any suggestions? Thanks!
  5. codym

    Delete client

    Crud. I didn't even see the getByUserID method. Thank you!
  6. codym

    Delete client

    I'm trying to use the Blesta API to delete a client. First, I used the users/delete endpoint to attempt to delete the user but received the error: So I assume that I should delete the client associated with the user first, correct? When looking through the documentation I can't find a method for getting the client ID by any user information, such as ID or username. What is the proper way to go about deleting clients with their user ID?
×
×
  • Create New...