Company Addresses

ActiveCollab offers a simple API that lets you implement auto-complete for invoice, estimate or recurring profile client. This API will provide all companies defined in the People section (except owner company), plus all companies previously used in invoices, estimates and recurring profiles that are not saved in People section.

Sleeping for 1 seconds

To demonstrate this, we have created several invoices, estimate and a recurring profile for different companies:

Response: HTTP 200, application/json (Hide)
GET /invoices

Response:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
[
    {
        "id": 3,
        "class": "Invoice",
        "url_path": "\/invoices\/3",
        "is_trashed": false,
        "trashed_on": null,
        "trashed_by_id": 0,
        "company_id": 0,
        "company_name": "Microsoft Corporation",
        "company_address": "15010 Northeast 36th Street\nRedmond, WA",
        "note": null,
        "currency_id": 0,
        "language_id": 0,
        "discount_rate": 0,
        "subtotal": 6125,
        "subtotal_without_discount": 6125,
        "discount": 0,
        "tax": 568.75,
        "rounding_difference": 0,
        "rounded_total": 6693.75,
        "total": 6693.75,
        "paid_amount": 0,
        "balance_due": 6693.75,
        "recipients": null,
        "email_from": null,
        "email_subject": null,
        "email_body": null,
        "second_tax_is_enabled": false,
        "second_tax_is_compound": false,
        "created_on": 1430164706,
        "created_by_id": 1,
        "updated_on": 1430164706,
        "based_on_type": null,
        "based_on_id": null,
        "number": "3\/2014",
        "project_id": 0,
        "purchase_order_number": null,
        "issued_on": 1430164706,
        "due_on": 1430164706,
        "allow_payments": 1,
        "closed_on": null,
        "sent_on": null,
        "hash": "reypERZ4S3U7eOW00voEeUp2x0E2dztvESK9yz2g",
        "status": "issued",
        "public_url": "http:\/\/feather.dev\/s\/invoice?hash=reypERZ4S3U7eOW00voEeUp2x0E2dztvESK9yz2g&number=3%2F2014",
        "is_credit_invoice": false
    },
    {
        "id": 2,
        "class": "Invoice",
        "url_path": "\/invoices\/2",
        "is_trashed": false,
        "trashed_on": null,
        "trashed_by_id": 0,
        "company_id": 0,
        "company_name": "GOOGLE INC",
        "company_address": "garage",
        "note": null,
        "currency_id": 0,
        "language_id": 0,
        "discount_rate": 0,
        "subtotal": 6125,
        "subtotal_without_discount": 6125,
        "discount": 0,
        "tax": 568.75,
        "rounding_difference": 0,
        "rounded_total": 6693.75,
        "total": 6693.75,
        "paid_amount": 0,
        "balance_due": 6693.75,
        "recipients": null,
        "email_from": null,
        "email_subject": null,
        "email_body": null,
        "second_tax_is_enabled": false,
        "second_tax_is_compound": false,
        "created_on": 1430164705,
        "created_by_id": 1,
        "updated_on": 1430164705,
        "based_on_type": null,
        "based_on_id": null,
        "number": "2\/2014",
        "project_id": 0,
        "purchase_order_number": null,
        "issued_on": 1430164705,
        "due_on": 1430164705,
        "allow_payments": 1,
        "closed_on": null,
        "sent_on": null,
        "hash": "WsZTqzE6diddbzrq0FgdwiKxos3Nv54glR1Cgtwk",
        "status": "issued",
        "public_url": "http:\/\/feather.dev\/s\/invoice?hash=WsZTqzE6diddbzrq0FgdwiKxos3Nv54glR1Cgtwk&number=2%2F2014",
        "is_credit_invoice": false
    },
    {
        "id": 1,
        "class": "Invoice",
        "url_path": "\/invoices\/1",
        "is_trashed": false,
        "trashed_on": null,
        "trashed_by_id": 0,
        "company_id": 2,
        "company_name": "Honeydukes",
        "company_address": "7 High Street\nHogsmeade,UK",
        "note": null,
        "currency_id": 1,
        "language_id": 0,
        "discount_rate": 0,
        "subtotal": 6125,
        "subtotal_without_discount": 6125,
        "discount": 0,
        "tax": 568.75,
        "rounding_difference": 0,
        "rounded_total": 6693.75,
        "total": 6693.75,
        "paid_amount": 0,
        "balance_due": 6693.75,
        "recipients": null,
        "email_from": null,
        "email_subject": null,
        "email_body": null,
        "second_tax_is_enabled": false,
        "second_tax_is_compound": false,
        "created_on": 1430164704,
        "created_by_id": 1,
        "updated_on": 1430164705,
        "based_on_type": null,
        "based_on_id": null,
        "number": "1\/2014",
        "project_id": 0,
        "purchase_order_number": null,
        "issued_on": 1430164704,
        "due_on": 1430164704,
        "allow_payments": 1,
        "closed_on": null,
        "sent_on": null,
        "hash": "pJqC8Y9kRKTwx2LLBxpTwsgww9KUfSSvr0YnXVyD",
        "status": "issued",
        "public_url": "http:\/\/feather.dev\/s\/invoice?hash=pJqC8Y9kRKTwx2LLBxpTwsgww9KUfSSvr0YnXVyD&number=1%2F2014",
        "is_credit_invoice": false
    }
]
Response: HTTP 200, application/json (Hide)
GET /estimates

Response:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
[
    {
        "id": 1,
        "class": "Estimate",
        "url_path": "\/estimates\/1",
        "name": "CODE123",
        "comments_count": 0,
        "is_trashed": false,
        "trashed_on": null,
        "trashed_by_id": 0,
        "company_id": 0,
        "company_name": "Apple Inc",
        "company_address": "1 Infinite Loop\nCupertino, CA",
        "note": null,
        "currency_id": 0,
        "language_id": 0,
        "discount_rate": 0,
        "subtotal": 6125,
        "subtotal_without_discount": 6125,
        "discount": 0,
        "tax": 568.75,
        "rounding_difference": 0,
        "rounded_total": 6693.75,
        "total": 6693.75,
        "paid_amount": 0,
        "balance_due": 6693.75,
        "recipients": null,
        "email_from": null,
        "email_subject": null,
        "email_body": null,
        "second_tax_is_enabled": false,
        "second_tax_is_compound": false,
        "created_on": 1430164706,
        "created_by_id": 1,
        "updated_on": 1430164706,
        "hash": "Eq9NrT5nFBI4UKKRAQYHDDQoJha0vc8Zt5BKNuYi",
        "status": "draft",
        "public_url": "#"
    }
]
Response: HTTP 200, application/json (Hide)
GET /recurring-profiles

Response:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
[
    {
        "id": 1,
        "class": "RecurringProfile",
        "url_path": "\/recurring-profiles\/1",
        "name": "Repeating Invoice",
        "company_id": 0,
        "company_name": "Google Inc",
        "company_address": "1600 Amphitheatre Parkway\nMountain View, CA",
        "note": null,
        "currency_id": 0,
        "language_id": 0,
        "discount_rate": 0,
        "subtotal": 6125,
        "subtotal_without_discount": 6125,
        "discount": 0,
        "tax": 568.75,
        "rounding_difference": 0,
        "rounded_total": 6693.75,
        "total": 6693.75,
        "paid_amount": 0,
        "balance_due": 6693.75,
        "recipients": null,
        "email_from": null,
        "email_subject": null,
        "email_body": null,
        "second_tax_is_enabled": false,
        "second_tax_is_compound": false,
        "created_on": 1430164706,
        "created_by_id": 1,
        "project_id": 0,
        "purchase_order_number": null,
        "start_on": 1430092800,
        "last_trigger_on": null,
        "next_trigger_on": 1430092800,
        "frequency": "daily",
        "occurrences": 2,
        "triggered_number": 0,
        "stored_card_id": 0,
        "auto_issue": false,
        "is_enabled": false,
        "is_completed": false,
        "private_note": null,
        "invoice_due_after": 15
    }
]

Company addresses that we used can now be accessed using /companies/addresses-for-invoicing:

Response: HTTP 200, application/json (Hide)
GET /companies/addresses-for-invoicing

Response:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
[
    {
        "id": 0,
        "name": "Apple Inc",
        "address": "1 Infinite Loop\nCupertino, CA",
        "timestamp": 1430164706
    },
    {
        "id": 0,
        "name": "Google Inc",
        "address": "1600 Amphitheatre Parkway\nMountain View, CA",
        "timestamp": 1430164706
    },
    {
        "id": 2,
        "name": "Honeydukes",
        "address": "7 High Street\nHogsmeade,UK",
        "timestamp": 1430164704
    },
    {
        "id": 0,
        "name": "Microsoft Corporation",
        "address": "15010 Northeast 36th Street\nRedmond, WA",
        "timestamp": 1430164706
    }
]

Notice that system used the latest known address for companies that have multiple invoices, estimates or recurring profiles sent to them (in our example, it was Google Inc, that started in a garage, and now has a global HQ in Mountain View, CA).