Title: API New Invoice Number
Last modified: September 27, 2018

---

# API New Invoice Number

 *  Resolved [dfreeman33](https://wordpress.org/support/users/dfreeman33/)
 * (@dfreeman33)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/api-new-invoice-number/)
 * When using the API to create a new invoice, is there a way to retrieve the invoice
   number that was created?

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Contributor [MariaKravchenko](https://wordpress.org/support/users/mariakravchenko/)
 * (@mariakravchenko)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/api-new-invoice-number/#post-10751203)
 * Hello
 * In the answer to your request for creating the invoice, you could get full information
   about the invoice, including ID. Some example here – [https://wp-invoice.github.io/docs/api/](https://wp-invoice.github.io/docs/api/)
 * Variable `$new_invoice` includes everything that you need.
 * Regards.
 *  Thread Starter [dfreeman33](https://wordpress.org/support/users/dfreeman33/)
 * (@dfreeman33)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/api-new-invoice-number/#post-10751416)
 * When I try to access $new_invoice, it has a NULL value. When I look at the contents
   of $client, there is an error that is returned:
    Error: IXR_Error Object Code:-
   32700 Message: parse error. not well formed
 * I can see that the invoice was created, but I just can’t access $new_invoice
 *  Plugin Contributor [MariaKravchenko](https://wordpress.org/support/users/mariakravchenko/)
 * (@mariakravchenko)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/api-new-invoice-number/#post-10752301)
 * Something wrong with your request. For technical support please use the Feedback/
   Support tab in WP-Invoice Settings.
 * Regards.
 *  Thread Starter [dfreeman33](https://wordpress.org/support/users/dfreeman33/)
 * (@dfreeman33)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/api-new-invoice-number/#post-10759890)
 * I’ve tried with both an invoice I created as well as a copy/paste from the API
   example. In the example, the only lines I changed were the credentials, the client
   endpoint URL and the user_data array to point to an existing user. In both cases,
   the invoice is created, but the response includes the parse error.
 * Is anyone else using version 4.2.1 and able to generate invoices and access the
   responses?
 *  Plugin Contributor [MariaKravchenko](https://wordpress.org/support/users/mariakravchenko/)
 * (@mariakravchenko)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/api-new-invoice-number/#post-10763935)
 * We will be able to check that at the end of the month. Unfortunately, we have
   limited resources and can’t check that right now.
 *  Thread Starter [dfreeman33](https://wordpress.org/support/users/dfreeman33/)
 * (@dfreeman33)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/api-new-invoice-number/#post-10946919)
 * You can cancel this request. I found the problem was an issue with a child theme
   incompatibility that was affecting all XML-RPC request. This was causing the 
   parse error.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘API New Invoice Number’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-invoice_c36510.svg)
 * [WP-Invoice - Web Invoice and Billing](https://wordpress.org/plugins/wp-invoice/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-invoice/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-invoice/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-invoice/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-invoice/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-invoice/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [dfreeman33](https://wordpress.org/support/users/dfreeman33/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/api-new-invoice-number/#post-10946919)
 * Status: resolved